mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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
This commit is contained in:
parent
06bc0ad306
commit
86426344f4
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user