mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
WX: HiDPI: FrameAUI / Debugger
Changes: - MemoryWindow was cleaned up and gives more feedback on searches. Some bugs were fixed as well: - A complex bug that allowed tearing off tabs and opening multiple copies of a debug panel which lead to segfaults - Another segfault related to right-click menus on code/memory views when those tools were floating in their own window.
This commit is contained in:
@ -39,7 +39,6 @@ CLogWindow::CLogWindow(CFrame* parent, wxWindowID id, const wxPoint& pos, const
|
||||
: wxPanel(parent, id, pos, size, style, name), x(0), y(0), winpos(0), Parent(parent),
|
||||
m_LogAccess(true), m_Log(nullptr), m_cmdline(nullptr), m_FontChoice(nullptr)
|
||||
{
|
||||
Bind(wxEVT_CLOSE_WINDOW, &CLogWindow::OnClose, this);
|
||||
Bind(wxEVT_TIMER, &CLogWindow::OnLogTimer, this);
|
||||
|
||||
m_LogManager = LogManager::GetInstance();
|
||||
@ -94,6 +93,7 @@ void CLogWindow::CreateGUIControls()
|
||||
|
||||
m_LogManager->SetLogLevel((LogTypes::LOG_TYPE)i, (LogTypes::LOG_LEVELS)(verbosity));
|
||||
}
|
||||
m_has_listeners = true;
|
||||
|
||||
// Font
|
||||
m_FontChoice = new wxChoice(this, wxID_ANY);
|
||||
@ -132,11 +132,13 @@ void CLogWindow::CreateGUIControls()
|
||||
new wxButton(this, wxID_ANY, _("Clear"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
|
||||
m_clear_log_btn->Bind(wxEVT_BUTTON, &CLogWindow::OnClear, this);
|
||||
|
||||
const int space3 = FromDIP(3);
|
||||
|
||||
// Sizers
|
||||
wxBoxSizer* sTop = new wxBoxSizer(wxHORIZONTAL);
|
||||
sTop->Add(m_clear_log_btn);
|
||||
sTop->Add(m_FontChoice, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 3);
|
||||
sTop->Add(m_WrapLine, 0, wxALIGN_CENTER_VERTICAL);
|
||||
sTop->Add(m_clear_log_btn, 0, wxALIGN_CENTER_VERTICAL);
|
||||
sTop->Add(m_FontChoice, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, space3);
|
||||
sTop->Add(m_WrapLine, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, space3);
|
||||
|
||||
sBottom = new wxBoxSizer(wxVERTICAL);
|
||||
PopulateBottom();
|
||||
@ -149,15 +151,17 @@ void CLogWindow::CreateGUIControls()
|
||||
m_cmdline->SetFocus();
|
||||
}
|
||||
|
||||
void CLogWindow::OnClose(wxCloseEvent& event)
|
||||
CLogWindow::~CLogWindow()
|
||||
{
|
||||
SaveSettings();
|
||||
event.Skip();
|
||||
RemoveAllListeners();
|
||||
}
|
||||
|
||||
void CLogWindow::RemoveAllListeners()
|
||||
{
|
||||
if (!m_has_listeners)
|
||||
return;
|
||||
m_has_listeners = false;
|
||||
|
||||
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i)
|
||||
{
|
||||
m_LogManager->RemoveListener(static_cast<LogTypes::LOG_TYPE>(i),
|
||||
|
Reference in New Issue
Block a user