From efb52e707867eee720bbdd09727ecc815ea7fdad Mon Sep 17 00:00:00 2001 From: wxBen Date: Sun, 23 Sep 2018 16:04:58 +0200 Subject: [PATCH] Fix ribbon panel size after calling Realize() again Reset m_smallest_unminimised_size variable in Realize() before calling GetPanelSizerMinSize() to prevent the latter from using the old value of that variable, which could result in panel elements being cut off. Closes #18226. --- src/ribbon/panel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ribbon/panel.cpp b/src/ribbon/panel.cpp index 99f69bcd1d..6964788a35 100644 --- a/src/ribbon/panel.cpp +++ b/src/ribbon/panel.cpp @@ -671,6 +671,10 @@ bool wxRibbonPanel::Realize() wxSize minimum_children_size(0, 0); + // Reset it before calling GetPanelSizerMinSize() below as it shouldn't use + // the old value, if we had any. + m_smallest_unminimised_size = wxDefaultSize; + // Ask sizer if there is one present if(GetSizer()) {