diff --git a/include/mainwindow.h b/include/mainwindow.h index 3b0f6529..57449f6f 100644 --- a/include/mainwindow.h +++ b/include/mainwindow.h @@ -241,10 +241,10 @@ private slots: void on_comboBox_Weather_currentTextChanged(const QString &arg1); void on_comboBox_Type_currentTextChanged(const QString &arg1); void on_comboBox_BattleScene_currentTextChanged(const QString &arg1); - void on_checkBox_ShowLocation_clicked(bool checked); - void on_checkBox_AllowRunning_clicked(bool checked); - void on_checkBox_AllowBiking_clicked(bool checked); - void on_checkBox_AllowEscapeRope_clicked(bool checked); + void on_checkBox_ShowLocation_stateChanged(int selected); + void on_checkBox_AllowRunning_stateChanged(int selected); + void on_checkBox_AllowBiking_stateChanged(int selected); + void on_checkBox_AllowEscapeRope_stateChanged(int selected); void on_spinBox_FloorNumber_valueChanged(int offset); void on_actionUse_Encounter_Json_triggered(bool checked); void on_actionMonitor_Project_Files_triggered(bool checked); @@ -301,8 +301,8 @@ private slots: void on_comboBox_SecondaryTileset_currentTextChanged(const QString &arg1); void on_pushButton_ChangeDimensions_clicked(); void on_checkBox_smartPaths_stateChanged(int selected); - void on_checkBox_Visibility_clicked(bool checked); - void on_checkBox_ToggleBorder_stateChanged(int arg1); + void on_checkBox_Visibility_stateChanged(int selected); + void on_checkBox_ToggleBorder_stateChanged(int selected); void resetMapViewScale(); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 134b6e9a..cefa4362 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -844,9 +844,10 @@ void MainWindow::on_comboBox_BattleScene_currentTextChanged(const QString &battl } } -void MainWindow::on_checkBox_Visibility_clicked(bool checked) +void MainWindow::on_checkBox_Visibility_stateChanged(int selected) { if (editor && editor->map) { + bool checked = selected == Qt::Checked; if (checked) { editor->map->requiresFlash = "TRUE"; } else { @@ -856,9 +857,10 @@ void MainWindow::on_checkBox_Visibility_clicked(bool checked) } } -void MainWindow::on_checkBox_ShowLocation_clicked(bool checked) +void MainWindow::on_checkBox_ShowLocation_stateChanged(int selected) { if (editor && editor->map) { + bool checked = selected == Qt::Checked; if (checked) { editor->map->show_location = "TRUE"; } else { @@ -868,9 +870,10 @@ void MainWindow::on_checkBox_ShowLocation_clicked(bool checked) } } -void MainWindow::on_checkBox_AllowRunning_clicked(bool checked) +void MainWindow::on_checkBox_AllowRunning_stateChanged(int selected) { if (editor && editor->map) { + bool checked = selected == Qt::Checked; if (checked) { editor->map->allowRunning = "1"; } else { @@ -880,9 +883,10 @@ void MainWindow::on_checkBox_AllowRunning_clicked(bool checked) } } -void MainWindow::on_checkBox_AllowBiking_clicked(bool checked) +void MainWindow::on_checkBox_AllowBiking_stateChanged(int selected) { if (editor && editor->map) { + bool checked = selected == Qt::Checked; if (checked) { editor->map->allowBiking = "1"; } else { @@ -892,9 +896,10 @@ void MainWindow::on_checkBox_AllowBiking_clicked(bool checked) } } -void MainWindow::on_checkBox_AllowEscapeRope_clicked(bool checked) +void MainWindow::on_checkBox_AllowEscapeRope_stateChanged(int selected) { if (editor && editor->map) { + bool checked = selected == Qt::Checked; if (checked) { editor->map->allowEscapeRope = "1"; } else {