From: Jürgen Spitzmüller Date: Tue, 11 Aug 2009 12:34:06 +0000 (+0000) Subject: Fix bug 5946: Infinite loop when opening file with two files opened with the same... X-Git-Tag: 2.0.0~5771 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=86426344f4e16c602af2f375ff5a27ed94b957c2;p=features.git 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 --- 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();