Fix spurious assert when creating multiline wxTextCtrl from XRC.

Don't try to set the hint unconditionally, this doesn't work with multiline
text controls and so resulted in an assert when trying to create one from XRC
since the changes of r76629.

Closes #16317.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-06-05 00:28:46 +00:00
parent f81a758d4e
commit d8933b2b8d

View File

@@ -69,7 +69,9 @@ wxObject *wxTextCtrlXmlHandler::DoCreateResource()
if (HasParam(wxT("maxlength")))
text->SetMaxLength(GetLong(wxT("maxlength")));
text->SetHint(GetText(wxS("hint")));
const wxString hint = GetText(wxS("hint"));
if (!hint.empty())
text->SetHint(hint);
return text;
}