CodeWindow: Eliminate explicit menu item updating from CodeWindow

Gets rid of more menu-related code from CodeWindow and puts it back in
CFrame where it belongs.

This turns the previous menu update function within CodeWindow into one
that simply updates the debugger font for its managed controls. It also
improves how the font is actually updated. Previously, fonts would change,
however this wouldn't actually reflect onto the respective controls until
a refresh or update event occurred. Since codeview, callstack, symbols,
callers, and calls windows are all managed by a wxAuiManager instance,
calling Update() on it after the font has been set will reflect font
changes immediately.
This commit is contained in:
Lioncash 2016-11-03 18:02:53 -04:00
parent e18ceca7af
commit 5ae6c21c2e
6 changed files with 88 additions and 61 deletions

View file

@ -447,6 +447,7 @@ void CCodeWindow::OnChangeFont(wxCommandEvent& event)
if (dialog.ShowModal() == wxID_OK)
DebuggerFont = dialog.GetFontData().GetChosenFont();
UpdateFonts();
// TODO: Send event to all panels that tells them to reload the font when it changes.
}