From 06f9763b45fe23530103f87d1d807d68a02aee5f Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Tue, 29 Apr 2008 15:45:06 +0000 Subject: [PATCH] * only use path to decide whether a path segment "helped" to make the string unique in the tabbar. Otherwise the "..." give strange behaviour because foo/.../bla.lyx is different from foo/bla.lyx. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24556 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiWorkArea.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index 3794296b67..8aeb5bd982 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -1220,6 +1220,7 @@ TabWorkArea::TabWorkArea(QWidget * parent) QTabBar* tb = new DragTabBar; connect(tb, SIGNAL(tabMoveRequested(int, int)), this, SLOT(moveTab(int, int))); + tb->setElideMode(Qt::ElideNone); setTabBar(tb); // make us responsible for the context menu of the tabbar @@ -1445,17 +1446,14 @@ public: } } /// - QString forecastDisplayString() const + QString forecastPathString() const { if (postfix_.count() == 0) return displayString(); - bool postfixLeft = postfix_.count() > 1; return prefix_ + (dottedPrefix_ ? ".../" : "") - + postfix_.front() + "/" - + (postfixLeft ? ".../" : "") - + filename_; + + postfix_.front() + "/"; } /// bool final() const @@ -1559,25 +1557,25 @@ void TabWorkArea::updateTabTexts() // that it makes the path more unique. somethingChanged = true; It sit = segStart; - QString dspString = sit->forecastDisplayString(); + QString dspString = sit->forecastPathString(); LYXERR(Debug::GUI, "first forecast found for " << fromqstr(sit->abs()) << " => " << fromqstr(dspString)); ++sit; bool moreUnique = false; for (; sit != next; ++sit) { - if (sit->forecastDisplayString() != dspString) { + if (sit->forecastPathString() != dspString) { LYXERR(Debug::GUI, "different forecast found for " << fromqstr(sit->abs()) << " => " - << fromqstr(sit->forecastDisplayString())); + << fromqstr(sit->forecastPathString())); moreUnique = true; break; } else { LYXERR(Debug::GUI, "same forecast found for " << fromqstr(sit->abs()) << " => " - << fromqstr(sit->forecastDisplayString())); + << fromqstr(dspString)); } } -- 2.39.2