From 477259372f885129593abff171df50c3ce1b3d93 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 13 Mar 2015 06:54:48 -0400 Subject: 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. --- lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lumina-desktop') 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"); -- cgit