@SuppressWarnings("unused")
private void setNoteDirty() {
logger.log(logger.EXTREME, "Entering NeverNote.setNoteDirty()");
- noteDirty = true;
-
+
+ // If the note is dirty, then it is unsynchronized by default.
+ if (noteDirty)
+ return;
+
+ // Set the note as dirty and check if its status is synchronized in the display table
+ noteDirty = true;
+ for (int i=0; i<listManager.getUnsynchronizedNotes().size(); i++) {
+ if (listManager.getUnsynchronizedNotes().get(i).equals(currentNoteGuid))
+ return;
+ }
+
+ // If tihs wasn't already marked as unsynchronized, then we need to update the table
listManager.getUnsynchronizedNotes().add(currentNoteGuid);
for (int i=0; i<listManager.getNoteTableModel().rowCount(); i++) {
QModelIndex modelIndex = listManager.getNoteTableModel().index(i, Global.noteTableGuidPosition);
}
}
}
+
logger.log(logger.EXTREME, "Leaving NeverNote.setNoteDirty()");
}
private void saveNote() {
String content = getContent();\r
checkNoteTitle();\r
noteSignal.noteChanged.emit(currentNote.getGuid(), content); \r
- \r
- \r
-// noteSignal.noteChanged.emit(currentNote.getGuid(), unicode);\r
}\r
\r
// The notebook selection has changed\r
//* MicroFocus changed\r
//****************************************************************\r
private void microFocusChanged() {\r
- \r
boldButton.setDown(false);\r
italicButton.setDown(false);\r
underlineButton.setDown(false);\r
if (!reload) {\r
logger.log(logger.EXTREME, "TableView.load() reload starting.");\r
proxyModel.filter();\r
+ setSortingEnabled(true);\r
logger.log(logger.EXTREME, "TableView.load() leaving reload.");\r
return;\r
}\r