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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user