Fix bug where the Actor box would get incorrectly set to the placeholder text

Originally committed to SVN as r6540.
This commit is contained in:
Thomas Goyne 2012-03-07 22:40:54 +00:00
parent b64e1f925c
commit 9f6bb17379
1 changed files with 7 additions and 0 deletions

View File

@ -97,6 +97,13 @@ public:
if (new_value != BaseCtrl::GetValue())
BaseCtrl::ChangeValue(new_value);
}
/// Override GetValue to return empty when in placeholder mode rather than the placeholder text
wxString GetValue() const {
if (is_placeholder && !this->HasFocus())
return "";
return BaseCtrl::GetValue();
}
};
template<> inline void Placeholder<wxComboBox>::Create(wxWindow *parent, wxSize const& size, long style) {