StretchableLayoutManager::clearAllItems()


#1

Hi Jules,

A small suggestion for StretchableLayoutManager::clearAllItems() -

At the moment, if the layout changes, but the size doesn’t, then StretchableLayoutManager::layOutComponents() wont work, because StretchableLayoutManager::totalSize hasn’t changed.

If clearAllItems() could reset totalSize then it would work as expected, ie, clearing all items and recreating a new layout will work even if the size of the layout hasn’t changed…

[code]void StretchableLayoutManager::clearAllItems()
{
items.clear();

//graf added this
totalSize = 0;

}[/code]


#2

Nice one - yes, very good, I’ll add that. Thanks!


#3

yowee, i didn’t know this component existed! that’s brilliant. i was sure that you hadn’t kept all that sort of stuff for just Tracktion’s tracks, and i wanted to have a split component and the resizableBorderComponent wasn’t cutting it… i was gonna build one up myself and now i see this!

:smiley: constant amazement at JUCE :slight_smile:


#4

[quote=“haydxn”]yowee, i didn’t know this component existed! that’s brilliant. i was sure that you hadn’t kept all that sort of stuff for just Tracktion’s tracks, and i wanted to have a split component and the resizableBorderComponent wasn’t cutting it… i was gonna build one up myself and now i see this!

:smiley: constant amazement at JUCE :)[/quote]

aaaaargh! just discovered AudioSampleBuffer::readFromAudioReader

note to self: always read to bottom of help page

that’s embarrassing. och weel my own version wasn’t far off.

:oops: :twisted:

we need a juce book


#5