Defer splitter calculation until next event

Windows doesn't have valid sizes in the size event

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13019
This commit is contained in:
Jon Evans 2022-12-06 08:05:28 -05:00
parent c326c57e05
commit 74fa88c0f6
1 changed files with 4 additions and 1 deletions

View File

@ -89,7 +89,10 @@ PROPERTIES_PANEL::PROPERTIES_PANEL( wxWindow* aParent, EDA_BASE_FRAME* aFrame )
Bind( wxEVT_SIZE,
[&]( wxSizeEvent& aEvent )
{
RecalculateSplitterPos();
CallAfter( [&]()
{
RecalculateSplitterPos();
} );
aEvent.Skip();
} );
}