Skip to content

Commit c1cd7b8

Browse files
committed
Fix placeholder comboboxes on wxGTK
Fixes #406.
1 parent f3a2d9b commit c1cd7b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/placeholder_ctrl.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,10 @@ class Placeholder final : public BaseCtrl {
9797

9898
/// Override GetValue to return empty when in placeholder mode rather than the placeholder text
9999
wxString GetValue() const override {
100-
if (is_placeholder && !this->HasFocus())
100+
auto baseValue = BaseCtrl::GetValue();
101+
if (is_placeholder && !this->HasFocus() && baseValue == placeholder)
101102
return "";
102-
return BaseCtrl::GetValue();
103+
return baseValue;
103104
}
104105
#else
105106
public:

0 commit comments

Comments
 (0)