1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed a bug where ConcertinaPanel::setPanelHeaderSize() wouldn't resize the panel header correctly.

This commit is contained in:
ed 2017-03-31 09:51:39 +01:00
parent dcdcfaa7e9
commit 50eeb1df7e

View file

@ -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();
}
}