]> git.lyx.org Git - features.git/commitdiff
Fix bug 5946: Infinite loop when opening file with two files opened with the same...
authorJürgen Spitzmüller <spitz@lyx.org>
Tue, 11 Aug 2009 12:34:06 +0000 (12:34 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Tue, 11 Aug 2009 12:34:06 +0000 (12:34 +0000)
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

index dda253b0155c2bf2a6526218ad0426151f6e284b..4ec9c0ed892fbeb14795da3d317257764594bfa4 100644 (file)
@@ -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();