From 59abfee11d4a08e10a00f8db6c2bcc2476f5423a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 4 Dec 2016 14:47:08 +0100 Subject: DolphinWX: Add ability to filter symbols (by name) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows the user to filter symbols by name, instead of having to scroll through a very, very long listbox… --- .../Core/DolphinWX/Debugger/CodeWindowFunctions.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp') diff --git a/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp b/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp index 3206721851..745d40202f 100644 --- a/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "Common/CommonPaths.h" @@ -398,20 +399,28 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event) } } -void CCodeWindow::NotifyMapLoaded() +void CCodeWindow::ReloadSymbolListBox() { - if (!codeview) - return; - - g_symbolDB.FillInCallers(); symbols->Freeze(); // HyperIris: wx style fast filling symbols->Clear(); + const wxString filtering_string = m_symbol_filter_ctrl->GetValue().Trim().Trim(false); for (const auto& symbol : g_symbolDB.Symbols()) { + if (symbol.second.name.find(filtering_string) == std::string::npos) + continue; int idx = symbols->Append(StrToWxStr(symbol.second.name)); symbols->SetClientData(idx, (void*)&symbol.second); } symbols->Thaw(); +} + +void CCodeWindow::NotifyMapLoaded() +{ + if (!codeview) + return; + + g_symbolDB.FillInCallers(); + ReloadSymbolListBox(); Repopulate(); } -- cgit v1.2.3