mirror of
https://github.com/Rosalie241/RMG.git
synced 2026-11-18 11:44:03 +01:00
RMG-Input: allow removing/resetting the main profile
This commit is contained in:
1 parent
722ca67b87
commit
0f3e70706d
1 file changed
+9
-5
@@ -454,11 +454,15 @@ void ControllerWidget::on_removeProfileButton_clicked()
|
||||
if (this->profileComboBox->currentIndex() == 0)
|
||||
{
|
||||
QMessageBox messageBox(this);
|
||||
messageBox.setIcon(QMessageBox::Icon::Critical);
|
||||
messageBox.setWindowTitle("Error");
|
||||
messageBox.setText("Cannot remove main profile!");
|
||||
messageBox.addButton(QMessageBox::Ok);
|
||||
messageBox.exec();
|
||||
messageBox.setIcon(QMessageBox::Icon::Warning);
|
||||
messageBox.setText("Are you sure you want to reset the main profile?");
|
||||
messageBox.addButton(QMessageBox::Yes);
|
||||
messageBox.addButton(QMessageBox::No);
|
||||
if (messageBox.exec() == QMessageBox::Yes)
|
||||
{
|
||||
this->SaveDefaultSettings();
|
||||
this->LoadSettings(this->getCurrentSettingsSection());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user