OSDN Git Service

設定のリセット処理が抜けていたのを修正
authorMasayuki Satoh <miyabi.satoh@gmail.com>
Mon, 15 Sep 2014 01:53:20 +0000 (10:53 +0900)
committerMasayuki Satoh <miyabi.satoh@gmail.com>
Mon, 15 Sep 2014 01:53:20 +0000 (10:53 +0900)
mainwindow.cpp
preferences.cpp
preferences.h

index 9020afc..1e62e5e 100644 (file)
@@ -71,6 +71,12 @@ MainWindow::MainWindow(QWidget *parent) :
     }\r
 #endif\r
 \r
+    // 設定の初期化\r
+    Preferences prefs(this);\r
+    if (prefs.isReset()) {\r
+        prefs.clear();\r
+    }\r
+\r
     // パネルにモデルを割り当てる\r
     ui->LPanel->setModel(new FolderModel(this));\r
     ui->RPanel->setModel(new FolderModel(this));\r
@@ -83,7 +89,6 @@ MainWindow::MainWindow(QWidget *parent) :
     ui->FPanel->setVisible(false);\r
 \r
     // モデルを初期化する\r
-    Preferences prefs(this);\r
     prefs.restoreModel("Left", ui->LPanel->model());\r
     prefs.restoreModel("Right", ui->RPanel->model());\r
 \r
index 5317abc..116b181 100644 (file)
@@ -242,6 +242,7 @@ QColor Preferences::locationBoxBgColor(bool active) const
         setValue(#key, value);                      \
     }
 
+IMPLEMENT_BOOL(Reset, false)
 IMPLEMENT_BOOL(CheckUpdate, true)
 IMPLEMENT_BOOL(ConfirmQuit, true)
 IMPLEMENT_BOOL(ConfirmCopy, true)
index 677240f..d9cc9de 100644 (file)
@@ -48,6 +48,7 @@ public:
     QColor locationBoxFgColor(bool active) const;
     QColor locationBoxBgColor(bool active) const;
 
+    DECLARE_BOOL(Reset);
     DECLARE_BOOL(CheckUpdate);
     DECLARE_BOOL(ConfirmQuit);
     DECLARE_BOOL(ConfirmCopy);