[gnote] Fix note always re-opening in new window



commit a62710ebcd749b897d8b4a364c8398a07de94a20
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Mon Oct 4 22:22:49 2021 +0300

    Fix note always re-opening in new window

 src/mainwindow.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index bdd5ca9f..bcb62b50 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -91,7 +91,7 @@ MainWindow *MainWindow::present_default(IGnote & g, const Note::Ptr & note)
     if (note->has_window()) {
       win = dynamic_cast<MainWindow*>(note->get_window()->host());
     }
-    else {
+    if(!win) {
       win = &g.get_window_for_note();
     }
   }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]