Browse Source

safety-check in Label. Typo fix in MessageManager.

tags/2021-05-28
jules 12 years ago
parent
commit
7452efb9e7
2 changed files with 5 additions and 1 deletions
  1. +1
    -1
      modules/juce_events/messages/juce_MessageManager.cpp
  2. +4
    -0
      modules/juce_gui_basics/widgets/juce_Label.cpp

+ 1
- 1
modules/juce_events/messages/juce_MessageManager.cpp View File

@@ -118,7 +118,7 @@ bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor)
}
JUCE_CATCH_EXCEPTION
if (millisecondsToRunFor >= 0 && Time::currentTimeMillis() >= currentTime)
if (millisecondsToRunFor >= 0 && Time::currentTimeMillis() >= endTime)
break;
}


+ 4
- 0
modules/juce_gui_basics/widgets/juce_Label.cpp View File

@@ -209,6 +209,10 @@ void Label::showEditor()
editor->setText (getText(), false);
editor->addListener (this);
editor->grabKeyboardFocus();
if (editor == nullptr) // may be deleted by a callback
return;
editor->setHighlightedRegion (Range<int> (0, textValue.toString().length()));
resized();


Loading…
Cancel
Save