From 86426344f4e16c602af2f375ff5a27ed94b957c2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Tue, 11 Aug 2009 12:34:06 +0000 Subject: [PATCH] Fix bug 5946: Infinite loop when opening file with two files opened with the same name This simply changes the appearance of the display path (in the tab header) in one detail: if the file suffix is not "lyx" (but "lyx15" etc.), the file is displayed with the extension. This fixes the problem (which is due to identical display paths), and it adds, IMHO, useful information to the GUI. Patch reviewed by vfr. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30977 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiWorkArea.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index dda253b015..4ec9c0ed89 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -1550,7 +1550,9 @@ public: DisplayPath(int tab, FileName const & filename) : tab_(tab) { - filename_ = toqstr(filename.onlyFileNameWithoutExt()); + filename_ = (filename.extension() == "lyx") ? + toqstr(filename.onlyFileNameWithoutExt()) + : toqstr(filename.onlyFileName()); postfix_ = toqstr(filename.absoluteFilePath()). split("/", QString::SkipEmptyParts); postfix_.pop_back(); -- 2.39.5