src/Builder4/MainWindow.bjs
authorAlan Knowles <alan@roojs.com>
Wed, 31 Jan 2024 10:44:02 +0000 (18:44 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 31 Jan 2024 10:44:02 +0000 (18:44 +0800)
src/Builder4/MainWindow.vala

src/Builder4/MainWindow.bjs
src/Builder4/MainWindow.vala

index 54b610a..3ba2f69 100644 (file)
                  "\tif (ws == null) {",
                  "\t\treturn;",
                  "\t}",
-                 "\tws.fileViewOpen(ws.file, ws.file_details.new_window,  -1);",
+                 "\tif (ws.file.path != this.windowstate.file.path) {",
+                 "\t\tthis.windowstate.fileViewOpen(ws.file, ws.file_details.new_window,  -1);",
+                 "\t}",
                  "\tthis.selectCurrent();",
                  " }"
                 ]
index ccb5d78..326fe8c 100644 (file)
@@ -1883,7 +1883,9 @@ public class Xcls_MainWindow : Object
                                if (ws == null) {
                                        return;
                                }
-                               ws.fileViewOpen(ws.file, ws.file_details.new_window,  -1);
+                               if (ws.file.path != this.windowstate.file.path) {
+                                       this.windowstate.fileViewOpen(ws.file, ws.file_details.new_window,  -1);
+                               }
                                this.selectCurrent();
                         });
                }