1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

OP-527 Implemented as requested: will load the default settings if no settings found, without asking.

This commit is contained in:
elafargue 2011-06-07 13:54:38 +02:00
parent 4f248172a3
commit 8ac5399c1d

View File

@ -290,13 +290,11 @@ void MainWindow::extensionsInitialized()
if ( ! qs->allKeys().count() ){ if ( ! qs->allKeys().count() ){
QMessageBox msgBox; QMessageBox msgBox;
msgBox.setText(tr("No configuration file could be found.")); msgBox.setText(tr("No configuration file could be found."));
msgBox.setInformativeText(tr("Do you want to load the default configuration?")); msgBox.setInformativeText(tr("The default configuration will be loaded."));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setDefaultButton(QMessageBox::Yes); msgBox.exec();
if ( msgBox.exec() == QMessageBox::Yes ){ qDebug() << "Load default config from resource /core/OpenPilotGCS.xml";
qDebug() << "Load default config from resource /core/OpenPilotGCS.xml"; qs = &defaultSettings;
qs = &defaultSettings;
}
} }
m_uavGadgetInstanceManager = new UAVGadgetInstanceManager(this); m_uavGadgetInstanceManager = new UAVGadgetInstanceManager(this);