1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-14 00:14:18 +00:00

Fix for AlertWindow::addTextEditor with custom look+feels

This commit is contained in:
jules 2015-10-12 17:34:06 +01:00
parent 15cd46a1de
commit 63f49e4c6b

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();
}