Ask for confirmation when resetting to factory settings.

merge-requests/3/merge
Teuniz 2020-01-20 11:45:36 +01:00
rodzic d33e3534ea
commit 480da059b8
2 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -35,7 +35,7 @@
#define PROGRAM_NAME "DSRemote"
#define PROGRAM_VERSION "0.37_1909011216"
#define PROGRAM_VERSION "0.37_2001201144"
#define MAX_PATHLEN 1024

Wyświetl plik

@ -2648,6 +2648,12 @@ void UI_Mainwindow::set_to_factory()
return;
}
QMessageBox msgBox2;
msgBox2.setText("Do you want to reset the instrument to the factory settings?");
msgBox2.setStandardButtons(QMessageBox::No | QMessageBox::Yes);
msgBox2.setDefaultButton(QMessageBox::No);
if(msgBox2.exec() != QMessageBox::Yes) return;
scrn_timer->stop();
scrn_thread->wait();
@ -2723,7 +2729,7 @@ void UI_Mainwindow::set_to_factory()
waveForm->update();
QMessageBox msgBox;
msgBox.setText("Restoring the instrument to the default state.\n"
msgBox.setText("Resetting the instrument to the factory settings.\n"
"Please wait...");
QTimer t_rst_1;