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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user