From 78fa4d328894f44cdc15689759b4263be265c237 Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 17 Aug 2022 16:21:01 +0800 Subject: [PATCH] hide the file navigation window when opening a new file --- src/Builder4/PopoverFiles.bjs | 1 + src/Builder4/PopoverFiles.vala | 1 + src/Builder4/WindowState.vala | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/src/Builder4/PopoverFiles.bjs b/src/Builder4/PopoverFiles.bjs index 66eecdc9a..b3317fe51 100644 --- a/src/Builder4/PopoverFiles.bjs +++ b/src/Builder4/PopoverFiles.bjs @@ -138,6 +138,7 @@ " ", " var f = JsRender.JsRender.factory(_this.selectedProject.xtype, _this.selectedProject, \"\");", " _this.win.windowstate.file_details.show( f, this.el, _this.new_window );", + " ", "", "}" ] diff --git a/src/Builder4/PopoverFiles.vala b/src/Builder4/PopoverFiles.vala index fc814e98d..8309ef304 100644 --- a/src/Builder4/PopoverFiles.vala +++ b/src/Builder4/PopoverFiles.vala @@ -543,6 +543,7 @@ public class Xcls_PopoverFiles : Object var f = JsRender.JsRender.factory(_this.selectedProject.xtype, _this.selectedProject, ""); _this.win.windowstate.file_details.show( f, this.el, _this.new_window ); + }); } diff --git a/src/Builder4/WindowState.vala b/src/Builder4/WindowState.vala index c296599d5..c75747612 100644 --- a/src/Builder4/WindowState.vala +++ b/src/Builder4/WindowState.vala @@ -585,6 +585,8 @@ public class WindowState : Object this.file_details.success.connect((project,file) => { this.fileViewOpen(file, this.file_details.new_window, -1); + // if it's comming from the file dialog -> hide it... + }); } @@ -623,6 +625,8 @@ public class WindowState : Object } if (new_window) { + + this.popover_files.el.hide(); BuilderApplication.newWindow(file, line); return; } -- 2.39.2