From: Vincent van Ravesteijn Date: Mon, 4 May 2009 11:53:34 +0000 (+0000) Subject: Aesthetics: Hide the tabbar when closing all windows one-by-one. X-Git-Tag: 2.0.0~6669 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9ba69f3f1b6cc17f371623b4c8cc0b32f5a0517c;p=features.git Aesthetics: Hide the tabbar when closing all windows one-by-one. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29532 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index d5c8f66476..8a2f8a4fc9 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -538,6 +538,8 @@ void GuiView::closeEvent(QCloseEvent * close_event) int splitter_count = d.splitter_->count(); for (; splitter_count; --splitter_count) { TabWorkArea * twa = d.tabWorkArea(0); + twa->showBar(false); + twa->updateTabTexts(); int twa_count = twa->count(); for (; twa_count; --twa_count) { diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index 5fa04fb049..8e948f6bec 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -1461,7 +1461,8 @@ bool TabWorkArea::removeWorkArea(GuiWorkArea * work_area) setFullScreen(true); else // Hide tabbar if there's only one tab. - showBar(count() > 1); + if (tabBar()->isVisible() && count() <= 1) + showBar(false); } else { lastWorkAreaRemoved(); }