PANEL_SETUP_NETCLASSES: fix not working (immediately closed) wxChoice widgets to select a filter
This happens with wxWidgets 3.0.4 on Windows and is a side effect of a call to Layout(). The fix just calls Layout() only when needed. Fixes: lp:1843594 https://bugs.launchpad.net/kicad/+bug/1843594
This commit is contained in:
parent
f1790c24e5
commit
c10d30c1c8
|
@ -492,9 +492,16 @@ void PANEL_SETUP_NETCLASSES::OnUpdateUI( wxUpdateUIEvent& event )
|
|||
wxSize netclassSize = GetClientSize();
|
||||
netclassSize.y -= m_membershipSize.y;
|
||||
|
||||
// Modify m_netclassesPane size only if needed, because calling Layout()
|
||||
// has a annoying effect if a wxChoice is open, it is closed by this call.
|
||||
// So it cannot blindly called inside each wxUpdateUIEvent event,
|
||||
// at least on Windows + wxWidgets 3.0 (do not happens with 3.1.1).
|
||||
if( netclassSize.y != m_netclassesPane->GetSize().y )
|
||||
{
|
||||
m_netclassesPane->SetMinSize( netclassSize );
|
||||
m_netclassesPane->SetMaxSize( netclassSize );
|
||||
Layout();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue