mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
DemoRunner: Fix a crash in MidiDemo
This commit is contained in:
parent
b08520c2de
commit
3ab2ef5924
2 changed files with 3 additions and 1 deletions
|
|
@ -247,10 +247,11 @@ private:
|
||||||
MidiDeviceListBox (const String& name,
|
MidiDeviceListBox (const String& name,
|
||||||
MidiDemo& contentComponent,
|
MidiDemo& contentComponent,
|
||||||
bool isInputDeviceList)
|
bool isInputDeviceList)
|
||||||
: ListBox (name, this),
|
: ListBox (name),
|
||||||
parent (contentComponent),
|
parent (contentComponent),
|
||||||
isInput (isInputDeviceList)
|
isInput (isInputDeviceList)
|
||||||
{
|
{
|
||||||
|
setModel (this);
|
||||||
setOutlineThickness (1);
|
setOutlineThickness (1);
|
||||||
setMultipleSelectionEnabled (true);
|
setMultipleSelectionEnabled (true);
|
||||||
setClickingTogglesRowSelection (true);
|
setClickingTogglesRowSelection (true);
|
||||||
|
|
|
||||||
|
|
@ -350,6 +350,7 @@ public:
|
||||||
auto newY = content.getY();
|
auto newY = content.getY();
|
||||||
auto newW = jmax (owner.minimumRowWidth, getMaximumVisibleWidth());
|
auto newW = jmax (owner.minimumRowWidth, getMaximumVisibleWidth());
|
||||||
auto newH = owner.totalItems * owner.getRowHeight();
|
auto newH = owner.totalItems * owner.getRowHeight();
|
||||||
|
DBG (owner.totalItems);
|
||||||
|
|
||||||
if (newY + newH < getMaximumVisibleHeight() && newH > getMaximumVisibleHeight())
|
if (newY + newH < getMaximumVisibleHeight() && newH > getMaximumVisibleHeight())
|
||||||
newY = getMaximumVisibleHeight() - newH;
|
newY = getMaximumVisibleHeight() - newH;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue