OSDN Git Service

連想ノートリストの重み付けにプリセットモードを導入した
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / dialog / ConfigDialog.java
index aae31c4..2e601aa 100644 (file)
@@ -229,7 +229,6 @@ public class ConfigDialog extends QDialog {
                Global.setDefaultFontSize(fontPage.getFontSize());\r
                Global.setDatabaseCache(debugPage.getDatabaseCacheSize());\r
                \r
-               // ICHANGED\r
                Global.setBrowseWeight(rensoNoteListPage.getBrowseWeight());\r
                Global.setCopyPasteWeight(rensoNoteListPage.getCopyPasteWeight());\r
                Global.setAddNewNoteWeight(rensoNoteListPage.getAddNewNoteWeight());\r
@@ -238,7 +237,18 @@ public class ConfigDialog extends QDialog {
                Global.setSameNotebookWeight(rensoNoteListPage.getSameNotebookWeight());\r
                Global.setENRelatedNotesWeight(rensoNoteListPage.getENRelatedNotesWeight());\r
                \r
-               // ICHANGED\r
+               // 現在カスタムモードなら、カスタムモードの設定値として保存\r
+               String mode = new String(Global.rensoWeightingSelect());\r
+               if (mode.equals("Custom")) {\r
+                       Global.saveCustomBrowseWeight(rensoNoteListPage.getBrowseWeight());\r
+                       Global.saveCustomCopyPasteWeight(rensoNoteListPage.getCopyPasteWeight());\r
+                       Global.saveCustomAddNewNoteWeight(rensoNoteListPage.getAddNewNoteWeight());\r
+                       Global.saveCustomRensoItemClickWeight(rensoNoteListPage.getRensoItemClickWeight());\r
+                       Global.saveCustomSameTagWeight(rensoNoteListPage.getSameTagWeight());\r
+                       Global.saveCustomSameNotebookWeight(rensoNoteListPage.getSameNotebookWeight());\r
+                       Global.saveCustomENRelatedNotesWeight(rensoNoteListPage.getENRelatedNotesWeight());\r
+               }\r
+               \r
                Global.setMergeRensoNote(rensoNoteListPage.getMergeChecked());\r
                Global.setDuplicateRensoNote(rensoNoteListPage.getDuplicateChecked());\r
                Global.setVerifyExclude(rensoNoteListPage.getVerifyExcludeChecked());\r