OSDN Git Service

Correct merge notes menu from never being re-enabled.
authorRandy Baumgarte <randy@fbn.cx>
Mon, 29 Aug 2011 01:39:56 +0000 (21:39 -0400)
committerRandy Baumgarte <randy@fbn.cx>
Mon, 29 Aug 2011 01:39:56 +0000 (21:39 -0400)
src/cx/fbn/nevernote/NeverNote.java

index 18b3796..204e74b 100644 (file)
@@ -3562,6 +3562,13 @@ public class NeverNote extends QMainWindow{
 
                saveNote();
                
+               // If we have more than one selection, then set the merge note action to true.
+       List<QModelIndex> selections = noteTableView.selectionModel().selectedRows();
+               if (selections.size() > 1) 
+               menuBar.noteMergeAction.setEnabled(true);
+               else
+                       menuBar.noteMergeAction.setEnabled(false);
+
                // If the ctrl key is pressed, then they are selecting multiple 
                // entries and we don't want to change the currently viewed note.
                if (QApplication.keyboardModifiers().isSet(KeyboardModifier.ControlModifier) &&
@@ -3574,7 +3581,6 @@ public class NeverNote extends QMainWindow{
                }
        noteTableView.showColumn(Global.noteTableGuidPosition);
        
-       List<QModelIndex> selections = noteTableView.selectionModel().selectedRows();
        if (!Global.isColumnVisible("guid"))
                noteTableView.hideColumn(Global.noteTableGuidPosition);