mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
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
@ -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…
x
Reference in New Issue
Block a user