diff options
| author | Mason Reed <mason@vector35.com> | 2025-10-12 22:48:41 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-10-12 22:50:20 -0400 |
| commit | 253fd4ad2d8095cc3c640c99d75ab3fd1cb7282e (patch) | |
| tree | 2bb2549d4aa29971143ec013df9cc6971abc6be2 /plugins/warp/ui/plugin.cpp | |
| parent | 40f7d40e394657575001a8146d8233f1fc4356fd (diff) | |
[WARP] Fix misc sidebar navigation / focus event bugs
- Fixed crash related to pending fetch callback for deleted view frame
- Fixed focus not being kept for tables in the sidebar, as well as focus in general
- Made matched function list navigation require a double click, to fix accidental navigation to other functions
Diffstat (limited to 'plugins/warp/ui/plugin.cpp')
| -rw-r--r-- | plugins/warp/ui/plugin.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/warp/ui/plugin.cpp b/plugins/warp/ui/plugin.cpp index e8088d7c..f3c1639b 100644 --- a/plugins/warp/ui/plugin.cpp +++ b/plugins/warp/ui/plugin.cpp @@ -174,23 +174,22 @@ WarpSidebarWidget::WarpSidebarWidget(BinaryViewRef data) : SidebarWidget("WARP") // Do a full update if analysis has been done, otherwise we may persist old data and not have new data. m_analysisEvent = new AnalysisCompletionEvent(m_data, [this]() { ExecuteOnMainThread([this]() { Update(); }); }); - const std::shared_ptr<WarpFetcher> fetcher = WarpFetcher::Global(); - fetcher->AddCompletionCallback([this]() { - Update(); + m_fetcher = WarpFetcher::Global(); + m_callbackId = m_fetcher->AddCompletionCallback([this]() { + ExecuteOnMainThread([this]() { Update(); }); return KeepCallback; }); // NOTE: This fetcher is shared with the fetch dialog that is constructed on initialization of this plugin. - m_currentFunctionWidget->SetFetcher(fetcher); + m_currentFunctionWidget->SetFetcher(m_fetcher); } WarpSidebarWidget::~WarpSidebarWidget() { m_analysisEvent->Cancel(); + m_fetcher->RemoveCompletionCallback(m_callbackId); } -void WarpSidebarWidget::focus() {} - void WarpSidebarWidget::Update() { m_currentFunctionWidget->UpdateMatches(); |
