Avoid permanently setting text hint color when using generic text entry hints
Multiple calls to SetHint() would cause the original color to be lost See #17118
This commit is contained in:
parent
26f48c225e
commit
281ad86d8d
@ -102,8 +102,11 @@ private:
|
||||
|
||||
// Save the old text colour and set a more inconspicuous one for the
|
||||
// hint.
|
||||
m_colFg = m_win->GetForegroundColour();
|
||||
m_win->SetForegroundColour(*wxLIGHT_GREY);
|
||||
if (!m_colFg.IsOk())
|
||||
{
|
||||
m_colFg = m_win->GetForegroundColour();
|
||||
m_win->SetForegroundColour(*wxLIGHT_GREY);
|
||||
}
|
||||
|
||||
m_entry->DoSetValue(m_hint, wxTextEntryBase::SetValue_NoEvent);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user