Fix the font pick buttons in the preferences dialog with wxGTK
wxGTK doesn't generate spin events when the value of a spin control is set programmatically, so generate the event ourseleves. Originally committed to SVN as r6323.
This commit is contained in:
parent
2bc43eb886
commit
2e2d896ea9
1 changed files with 5 additions and 1 deletions
|
@ -95,7 +95,11 @@ static void font_button(Preferences *parent, wxTextCtrl *name, wxSpinCtrl *size)
|
|||
font = wxGetFontFromUser(parent, font);
|
||||
if (font.IsOk()) {
|
||||
name->SetValue(font.GetFaceName());
|
||||
size->SetValue(wxString::Format("%d", font.GetPointSize()));
|
||||
size->SetValue(font.GetPointSize());
|
||||
// wxGTK doesn't generate wxEVT_COMMAND_SPINCTRL_UPDATED from SetValue
|
||||
wxSpinEvent evt(wxEVT_COMMAND_SPINCTRL_UPDATED);
|
||||
evt.SetInt(font.GetPointSize());
|
||||
size->ProcessWindowEvent(evt);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue