From 9f6bb17379bb4a6928c7387b75e9984ce02afff1 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 7 Mar 2012 22:40:54 +0000 Subject: [PATCH] Fix bug where the Actor box would get incorrectly set to the placeholder text Originally committed to SVN as r6540. --- aegisub/src/placeholder_ctrl.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/aegisub/src/placeholder_ctrl.h b/aegisub/src/placeholder_ctrl.h index dd9591588..98f5e2496 100644 --- a/aegisub/src/placeholder_ctrl.h +++ b/aegisub/src/placeholder_ctrl.h @@ -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::Create(wxWindow *parent, wxSize const& size, long style) {