mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Prevent continuous panel resizing
When resizing the panel, it retrieves the last defined pane size instead of the current one. To fix this, we need to trigger the event a second time after the pane size has been defined. This avoid calling m_AuiPanels.Update() that crashes windows if called directly Fixes https://gitlab.com/kicad/code/kicad/-/issues/17835
This commit is contained in:
parent
c736904e39
commit
3f4257139e
@ -484,6 +484,18 @@ void SCH_EDIT_FRAME::OnResizeHierarchyNavigator( wxSizeEvent& aEvent )
|
||||
{
|
||||
aEvent.Skip();
|
||||
|
||||
// 1st Call: Handle the size update during the first resize event.
|
||||
CaptureHierarchyPaneSize();
|
||||
|
||||
// Defer the second size capture
|
||||
CallAfter([this]() {
|
||||
CaptureHierarchyPaneSize();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::CaptureHierarchyPaneSize()
|
||||
{
|
||||
// Called when resizing the Hierarchy Navigator panel
|
||||
// Store the current pane size
|
||||
// It allows to retrieve the last defined pane size when switching between
|
||||
|
@ -1069,6 +1069,8 @@ private:
|
||||
|
||||
void onNetNavigatorSelChanging( wxTreeEvent& aEvent );
|
||||
|
||||
void CaptureHierarchyPaneSize();
|
||||
|
||||
private:
|
||||
// The schematic editor control class should be able to access some internal
|
||||
// functions of the editor frame.
|
||||
|
Loading…
x
Reference in New Issue
Block a user