Skip to content

Commit 9bfd500

Browse files
committed
Fix placeholder comboboxes on wxGTK
Fixes TypesettingTools#406.
1 parent 87e5018 commit 9bfd500

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/placeholder_ctrl.h

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

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

0 commit comments

Comments
 (0)