aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-03-13 06:54:48 -0400
committerKen Moore <ken@pcbsd.org>2015-03-13 06:54:48 -0400
commit477259372f885129593abff171df50c3ce1b3d93 (patch)
treed21bf9fcf283abb53f789db05f1090c0294bbdfc
parentMake sure that files visible in the userbutton have the appropriate icons bas... (diff)
downloadlumina-477259372f885129593abff171df50c3ce1b3d93.tar.gz
lumina-477259372f885129593abff171df50c3ce1b3d93.tar.bz2
lumina-477259372f885129593abff171df50c3ce1b3d93.zip
Add a couple more checks to the notepad plugin so that it does not update/change the current UI for a programmatic save of the info to disk.
-rw-r--r--lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp
index 6d4a2b5d..dacaca60 100644
--- a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp
+++ b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp
@@ -200,10 +200,12 @@ void NotePadPlugin::updateContents(){
QString note = cnote->currentData().toString();
updating = true;
LUtils::writeFile(note, edit->toPlainText().split("\n"), true);
+ QApplication::processEvents(); //make sure to process/discard the file changed signal before disabling the flag
updating = false;
}
void NotePadPlugin::notesDirChanged(){
+ if(updating){ return; }
QString cfile = settings->value("currentFile","").toString();
QStringList notes;
QDir dir(QDir::homePath()+"/Notes");
bgstack15