From dfa4afa826ba17c491d81720b81a218c32fc33ea Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sun, 7 Apr 2019 07:07:02 -0700 Subject: [PATCH] pcbnew: Freeze the netclasses dialog on init Prevents the size events from firing on Mac when we set up the netclass panel Fixes: lp:1819426 * https://bugs.launchpad.net/kicad/+bug/1819426 (cherry picked from commit a300ae105d3e2c17672d3482aa4f768eec97b79a) --- pcbnew/dialogs/panel_setup_netclasses.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/dialogs/panel_setup_netclasses.cpp b/pcbnew/dialogs/panel_setup_netclasses.cpp index a89f575827..b9d4eb7b47 100644 --- a/pcbnew/dialogs/panel_setup_netclasses.cpp +++ b/pcbnew/dialogs/panel_setup_netclasses.cpp @@ -64,6 +64,8 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, PCB_EDIT_ m_netclassesDirty = true; + // Prevent Size events from firing before we are ready + Freeze(); m_originalColWidths = new int[ m_netclassGrid->GetNumberCols() ]; // Calculate a min best size to handle longest usual numeric values: // (The 'M' large char is used to give a margin) @@ -104,6 +106,8 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, PCB_EDIT_ // wxFormBuilder doesn't include this event... m_netclassGrid->Connect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( PANEL_SETUP_NETCLASSES::OnNetclassGridCellChanging ), NULL, this ); + + Thaw(); }