mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-07 00:14:49 -04:00
Web API: /sdrangel/preset (PUT) implementation
This commit is contained in:
@@ -63,6 +63,7 @@
|
||||
#include <QDebug>
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(MainWindow::MsgLoadPreset, Message)
|
||||
MESSAGE_CLASS_DEFINITION(MainWindow::MsgSavePreset, Message)
|
||||
|
||||
MainWindow *MainWindow::m_instance = 0;
|
||||
|
||||
@@ -664,6 +665,15 @@ bool MainWindow::handleMessage(const Message& cmd)
|
||||
loadPresetSettings(notif.getPreset(), notif.getDeviceSetIndex());
|
||||
return true;
|
||||
}
|
||||
else if (MsgSavePreset::match(cmd))
|
||||
{
|
||||
MsgSavePreset& notif = (MsgSavePreset&) cmd;
|
||||
savePresetSettings(notif.getPreset(), notif.getDeviceSetIndex());
|
||||
if (notif.isNewPreset()) { ui->presetTree->setCurrentItem(addPresetToTree(notif.getPreset())); }
|
||||
m_settings.sortPresets();
|
||||
m_settings.save();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user