From 1fd862a3627b0e2fe46564b0ad35b583e0eb7253 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 30 Nov 2020 18:50:36 +0100 Subject: [PATCH] Page layout editor: fix missing scrollbars in properties panel (GTK specific) Fixes #4878 https://gitlab.com/kicad/code/kicad/issues/4878 --- pagelayout_editor/dialogs/properties_frame.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pagelayout_editor/dialogs/properties_frame.cpp b/pagelayout_editor/dialogs/properties_frame.cpp index 3a6a28354b..72773a44e3 100644 --- a/pagelayout_editor/dialogs/properties_frame.cpp +++ b/pagelayout_editor/dialogs/properties_frame.cpp @@ -293,7 +293,13 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( WS_DATA_ITEM* aItem ) // The number of widgets was modified, so recalculate sizers m_swItemProperties->Layout(); - // send a size event to be sure scroolbars will be added/removed as needed +#ifdef __WXGTK__ + // This call is mandatory on wxGTK to initialize the right virtual size and therefore + // scrollbars, but for some reason, create issues on Windows (incorrect disply + // until the frame is resized). Joys of multiplatform dev. + m_swItemProperties->->Fit(); +#endif + // send a size event to be sure scrollbars will be added/removed as needed m_swItemProperties->PostSizeEvent(); m_swItemProperties->Refresh(); }