From 068758f8dd9dbb14ac849c08ca49618ba49f88cd Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 5 Nov 2020 18:37:15 +0100 Subject: [PATCH] pl_editor, properties panel: ensure scroll-bars are show when needed After selecting an item one need to generate a size event after the widgets shown in properties panel are modified to create (or remove) scroll-bars according to the size of the panel and the displayed items. --- pagelayout_editor/properties_frame.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pagelayout_editor/properties_frame.cpp b/pagelayout_editor/properties_frame.cpp index b6115d9642..3a6a28354b 100644 --- a/pagelayout_editor/properties_frame.cpp +++ b/pagelayout_editor/properties_frame.cpp @@ -291,8 +291,10 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( WS_DATA_ITEM* aItem ) msg.Printf( wxT("%.3f"), aItem->m_IncrementVector.y ); m_textCtrlStepY->SetValue( msg ); - // The number of widgets was modified + // 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 + m_swItemProperties->PostSizeEvent(); m_swItemProperties->Refresh(); }