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 a300ae105d)
This commit is contained in:
Seth Hillbrand 2019-04-07 07:07:02 -07:00
parent a533514763
commit dfa4afa826
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();
}