Skip to content

Commit 01915de

Browse files
committed
[WARP] Fix sidebar not refreshing after fetching data from server
1 parent 9095891 commit 01915de

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

plugins/warp/ui/plugin.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,17 +163,24 @@ WarpSidebarWidget::WarpSidebarWidget(BinaryViewRef data) : SidebarWidget("WARP")
163163
tabWidget->addTab(matchedFrame, "Matched Functions");
164164
tabWidget->addTab(containerFrame, "Containers");
165165

166+
// Do a full update if analysis has been done, otherwise we may persist old data and not have new data.
166167
m_analysisEvent = new AnalysisCompletionEvent(m_data, [this]() {
167168
ExecuteOnMainThread([this]() {
168169
Update();
169170
});
170171
});
171172

173+
std::shared_ptr<WarpFetcher> fetcher = WarpFetcher::Global();
174+
fetcher->AddCompletionCallback([this]() {
175+
Update();
176+
return KeepCallback;
177+
});
178+
172179
layout->addWidget(tabWidget);
173180
this->setLayout(layout);
174181

175182
// NOTE: This fetcher is shared with the fetch dialog that is constructed on initialization of this plugin.
176-
m_currentFunctionWidget->SetFetcher(WarpFetcher::Global());
183+
m_currentFunctionWidget->SetFetcher(fetcher);
177184
}
178185

179186
WarpSidebarWidget::~WarpSidebarWidget()

0 commit comments

Comments
 (0)