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
This commit is contained in:
Seth Hillbrand 2019-04-07 07:07:02 -07:00
parent 196ddec81c
commit a300ae105d
1 changed files with 4 additions and 0 deletions

View File

@ -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();
}