aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp')
-rw-r--r--lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp
index 17372202..af1c78f5 100644
--- a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp
+++ b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp
@@ -118,7 +118,7 @@ void NotePadPlugin::openNote(){
QApplication::processEvents();
}
QStringList sel = dlg.selectedFiles();
- if(sel.isEmpty()){ return; } //cancelled
+ if(sel.isEmpty() || dlg.result()!=QDialog::Accepted){ return; } //cancelled
QString fullpath = sel.first();
QString name = fullpath.section("/",-1);
//qDebug() << " - Found Note:" << name << fullpath;
@@ -156,7 +156,7 @@ void NotePadPlugin::newNote(){
QApplication::processEvents();
}
QString name = dlg.textValue();
- if(name.isEmpty()){ return; } //cancelled
+ if(name.isEmpty() || dlg.result()!=QDialog::Accepted){ return; } //cancelled
QString fullpath = QDir::homePath()+"/Notes/"+name;
if(!fullpath.endsWith(".note")){ fullpath.append(".note"); }
//qDebug() << " - New Note:" << name << fullpath;
bgstack15