From 50eeb1df7e84a19a792ae240d8d49fefeee28170 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 31 Mar 2017 09:51:39 +0100 Subject: [PATCH] Fixed a bug where ConcertinaPanel::setPanelHeaderSize() wouldn't resize the panel header correctly. --- modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp b/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp index a6358cf3f4..9b0a9f9b75 100644 --- a/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp +++ b/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp @@ -349,12 +349,15 @@ void ConcertinaPanel::setMaximumPanelSize (Component* component, int maximumSize void ConcertinaPanel::setPanelHeaderSize (Component* component, int headerSize) { - const int index = indexOfComp (component); + const auto index = indexOfComp (component); jassert (index >= 0); // The specified component doesn't seem to have been added! if (index >= 0) { - currentSizes->get(index).minSize = headerSize; + auto oldMin = currentSizes->get (index).minSize; + + currentSizes->get (index).minSize = headerSize; + currentSizes->get (index).size += headerSize - oldMin; resized(); } }