mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-16 16:33:38 -04:00
Web API: implemented /sdrangel/deviceset/{deviceSetIndex}/focus PATCH
This commit is contained in:
@@ -76,6 +76,7 @@ MESSAGE_CLASS_DEFINITION(MainWindow::MsgRemoveLastDeviceSet, Message)
|
||||
MESSAGE_CLASS_DEFINITION(MainWindow::MsgSetDevice, Message)
|
||||
MESSAGE_CLASS_DEFINITION(MainWindow::MsgAddChannel, Message)
|
||||
MESSAGE_CLASS_DEFINITION(MainWindow::MsgDeleteChannel, Message)
|
||||
MESSAGE_CLASS_DEFINITION(MainWindow::MsgDeviceSetFocus, Message)
|
||||
|
||||
MainWindow *MainWindow::m_instance = 0;
|
||||
|
||||
@@ -813,6 +814,14 @@ bool MainWindow::handleMessage(const Message& cmd)
|
||||
deleteChannel(notif.getDeviceSetIndex(), notif.getChannelIndex());
|
||||
return true;
|
||||
}
|
||||
else if (MsgDeviceSetFocus::match(cmd))
|
||||
{
|
||||
MsgDeviceSetFocus& notif = (MsgDeviceSetFocus&) cmd;
|
||||
int index = notif.getDeviceSetIndex();
|
||||
if ((index >= 0) && (index < (int) m_deviceUIs.size())) {
|
||||
ui->tabInputsView->setCurrentIndex(index);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user