Browse Source

DemoRunner: Fix a crash in MidiDemo

v7.0.9
Tom Poole 3 years ago
parent
commit
3ab2ef5924
2 changed files with 3 additions and 1 deletions
  1. +2
    -1
      examples/Audio/MidiDemo.h
  2. +1
    -0
      modules/juce_gui_basics/widgets/juce_ListBox.cpp

+ 2
- 1
examples/Audio/MidiDemo.h View File

@@ -247,10 +247,11 @@ private:
MidiDeviceListBox (const String& name,
MidiDemo& contentComponent,
bool isInputDeviceList)
: ListBox (name, this),
: ListBox (name),
parent (contentComponent),
isInput (isInputDeviceList)
{
setModel (this);
setOutlineThickness (1);
setMultipleSelectionEnabled (true);
setClickingTogglesRowSelection (true);


+ 1
- 0
modules/juce_gui_basics/widgets/juce_ListBox.cpp View File

@@ -350,6 +350,7 @@ public:
auto newY = content.getY();
auto newW = jmax (owner.minimumRowWidth, getMaximumVisibleWidth());
auto newH = owner.totalItems * owner.getRowHeight();
DBG (owner.totalItems);
if (newY + newH < getMaximumVisibleHeight() && newH > getMaximumVisibleHeight())
newY = getMaximumVisibleHeight() - newH;


Loading…
Cancel
Save