diff options
author | Ken Moore <ken@pcbsd.org> | 2015-03-13 06:54:48 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-03-13 06:54:48 -0400 |
commit | 477259372f885129593abff171df50c3ce1b3d93 (patch) | |
tree | d21bf9fcf283abb53f789db05f1090c0294bbdfc /lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp | |
parent | Make sure that files visible in the userbutton have the appropriate icons bas... (diff) | |
download | lumina-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.
Diffstat (limited to 'lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp')
-rw-r--r-- | lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp | 2 |
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"); |