diff --git a/pcbnew/dialogs/dialog_multichannel_repeat_layout.cpp b/pcbnew/dialogs/dialog_multichannel_repeat_layout.cpp index 40caf12a02..bd03e7cf3f 100644 --- a/pcbnew/dialogs/dialog_multichannel_repeat_layout.cpp +++ b/pcbnew/dialogs/dialog_multichannel_repeat_layout.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -66,6 +67,7 @@ DIALOG_MULTICHANNEL_REPEAT_LAYOUT::DIALOG_MULTICHANNEL_REPEAT_LAYOUT ( int i = 0; + m_raGrid->PushEventHandler( new GRID_TRICKS( static_cast( m_raGrid ) ) ); m_raGrid->ClearGrid(); m_raGrid->EnableEditing( true ); m_raGrid->HideRowLabels(); @@ -111,6 +113,10 @@ DIALOG_MULTICHANNEL_REPEAT_LAYOUT::DIALOG_MULTICHANNEL_REPEAT_LAYOUT ( finishDialogSettings(); } +DIALOG_MULTICHANNEL_REPEAT_LAYOUT::~DIALOG_MULTICHANNEL_REPEAT_LAYOUT() +{ + m_raGrid->PopEventHandler( true ); +} bool DIALOG_MULTICHANNEL_REPEAT_LAYOUT::TransferDataFromWindow() { diff --git a/pcbnew/dialogs/dialog_multichannel_repeat_layout.h b/pcbnew/dialogs/dialog_multichannel_repeat_layout.h index 293d3f9cf0..d80bfd0af6 100644 --- a/pcbnew/dialogs/dialog_multichannel_repeat_layout.h +++ b/pcbnew/dialogs/dialog_multichannel_repeat_layout.h @@ -40,6 +40,7 @@ public: DIALOG_MULTICHANNEL_REPEAT_LAYOUT( PCB_BASE_FRAME* aFrame, MULTICHANNEL_TOOL* aParentTool ); + ~DIALOG_MULTICHANNEL_REPEAT_LAYOUT(); bool TransferDataFromWindow() override; bool TransferDataToWindow() override;