1
0
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:
f4exb
2018-01-06 03:46:53 +01:00
parent 13a0f445d0
commit 8a032d0532
97 changed files with 1334 additions and 86 deletions
+9
View File
@@ -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;
}