From 56bd7e4427bbf2fe83bc3b3a89bca802913d566c Mon Sep 17 00:00:00 2001 From: Alexander Boehm Date: Thu, 24 Apr 2025 21:45:12 +0200 Subject: [PATCH] multi-channel tool: grid tricks for repeat layout dialog This allows selecting/unselecting multiple checkboxes at once by hitting space. And maybe some other tricks I don't know about... --- pcbnew/dialogs/dialog_multichannel_repeat_layout.cpp | 6 ++++++ pcbnew/dialogs/dialog_multichannel_repeat_layout.h | 1 + 2 files changed, 7 insertions(+) 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;