@@ -67,7 +67,6 @@ |
|
|
67 |
67 |
#include "offsetmapdialog.h" |
68 |
68 |
#include "patreondialog.h" |
69 |
69 |
#include "preferences.h" |
70 |
|
-#include "preferencesdialog.h" |
71 |
70 |
#include "propertiesdock.h" |
72 |
71 |
#include "stampbrush.h" |
73 |
72 |
#include "terrain.h" |
@@ -1250,8 +1249,14 @@ void MainWindow::delete_() |
|
|
1250 |
1249 |
|
1251 |
1250 |
void MainWindow::openPreferences() |
1252 |
1251 |
{ |
1253 |
|
- PreferencesDialog preferencesDialog(this); |
1254 |
|
- preferencesDialog.exec(); |
|
1252 |
+if (!mPreferencesDialog) { |
|
1253 |
+mPreferencesDialog = new PreferencesDialog(this); |
|
1254 |
+mPreferencesDialog->setAttribute(Qt::WA_DeleteOnClose); |
|
1255 |
+ } |
|
1256 |
+ |
|
1257 |
+mPreferencesDialog->show(); |
|
1258 |
+mPreferencesDialog->activateWindow(); |
|
1259 |
+mPreferencesDialog->raise(); |
1255 |
1260 |
} |
1256 |
1261 |
|
1257 |
1262 |
void MainWindow::labelVisibilityActionTriggered(QAction *action) |