[LyX/master] Revert "No need (any longer?) to create a new view for lyxfiles-open"

Juergen Spitzmueller spitz at lyx.org
Fri Sep 8 13:23:57 UTC 2023


commit 90e05de396a8b2da4b6bd739554edfacbda1798f
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Fri Sep 8 16:37:06 2023 +0200

    Revert "No need (any longer?) to create a new view for lyxfiles-open"
    
    This reverts commit 9f238ca201ef640b47bd413f2d98671404aa173a.
---
 src/frontends/qt/GuiApplication.cpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp
index 31cdcb7..57eaaf6 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -1901,6 +1901,12 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
 	}
 
 	case LFUN_LYXFILES_OPEN: {
+		// This is the actual reason for this method (#12106).
+		validateCurrentView();
+		if (!current_view_
+		   || (!lyxrc.open_buffers_in_tabs
+		       && current_view_->documentBufferView() != nullptr))
+			createView();
 		string arg = to_utf8(cmd.argument());
 		if (arg.empty())
 			// set default


More information about the lyx-cvs mailing list