Browse Source

Fix for AlertWindow::addTextEditor with custom look+feels

tags/2021-05-28
jules 9 years ago
parent
commit
63f49e4c6b
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      modules/juce_gui_basics/windows/juce_AlertWindow.cpp

+ 3
- 3
modules/juce_gui_basics/windows/juce_AlertWindow.cpp View File

@@ -89,7 +89,7 @@ void AlertWindow::addButton (const String& name,
const KeyPress& shortcutKey1,
const KeyPress& shortcutKey2)
{
TextButton* const b = new TextButton (name, String::empty);
TextButton* const b = new TextButton (name, String());
buttons.add (b);
b->setWantsKeyboardFocus (true);
@@ -143,9 +143,9 @@ void AlertWindow::addTextEditor (const String& name,
ed->setColour (TextEditor::outlineColourId, findColour (ComboBox::outlineColourId));
ed->setFont (getLookAndFeel().getAlertWindowMessageFont());
addAndMakeVisible (ed);
ed->setText (initialContents);
ed->setCaretPosition (initialContents.length());
addAndMakeVisible (ed);
textboxNames.add (onScreenLabel);
updateLayout (false);
@@ -165,7 +165,7 @@ String AlertWindow::getTextEditorContents (const String& nameOfTextEditor) const
if (TextEditor* const t = getTextEditor (nameOfTextEditor))
return t->getText();
return String::empty;
return String();
}


Loading…
Cancel
Save