Skip to content

Commit 951ae7d

Browse files
committed
adrv9009: fix menu tool list for multidevice adrv9009
When connecting to the multidevice version we dinamically create new tools Those need to be removed on disconnect to clean the menu Signed-off-by: IonutMuthi <Ionut.Muthi@analog.com>
1 parent 542b6f2 commit 951ae7d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/adrv9009/plugins/adrv9009plugin/src/adrv9009plugin.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,12 @@ bool Adrv9009Plugin::onDisconnect()
243243
m_widgetGroup = nullptr;
244244
}
245245

246+
while(m_toolList.size() > 2) {
247+
ToolMenuEntry *entry = m_toolList.takeLast();
248+
delete entry;
249+
}
250+
Q_EMIT toolListChanged();
251+
246252
// Close connection
247253
ConnectionProvider *cp = ConnectionProvider::GetInstance();
248254
cp->close(m_param);

0 commit comments

Comments
 (0)