1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-08 08:54:49 -04:00

REST API: config: fixes (1)

This commit is contained in:
f4exb
2019-08-12 01:46:27 +02:00
parent 48bd89aa09
commit ca66e47283
4 changed files with 55 additions and 16 deletions
+24
View File
@@ -121,6 +121,7 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse
SDRangelSplash *splash = new SDRangelSplash(logoPixmap);
splash->setMessageRect(QRect(10, 80, 350, 16));
splash->show();
splash->showStatusMessage("starting...", Qt::white);
splash->showStatusMessage("starting...", Qt::white);
m_settings.setAudioDeviceManager(m_dspEngine->getAudioDeviceManager());
@@ -912,6 +913,29 @@ QTreeWidgetItem* MainWindow::addCommandToTree(const Command* command)
void MainWindow::applySettings()
{
loadPresetSettings(m_settings.getWorkingPreset(), 0);
m_settings.sortPresets();
int middleIndex = m_settings.getPresetCount() / 2;
QTreeWidgetItem *treeItem;
ui->presetTree->clear();
for (int i = 0; i < m_settings.getPresetCount(); ++i)
{
treeItem = addPresetToTree(m_settings.getPreset(i));
if (i == middleIndex) {
ui->presetTree->setCurrentItem(treeItem);
}
}
m_settings.sortCommands();
ui->commandTree->clear();
for (int i = 0; i < m_settings.getCommandCount(); ++i) {
treeItem = addCommandToTree(m_settings.getCommand(i));
}
setLoggingOptions();
}
bool MainWindow::handleMessage(const Message& cmd)