From 86b6bb9d18c54e2b37cf03fc11afd7a2e020fd60 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sat, 31 Oct 2009 18:14:21 +0000 Subject: [PATCH] Fix r31814: we have to close the tab not hide it. Also rename the closeCurrentTab() function to hideCurrentTab(). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31815 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiWorkArea.cpp | 6 +++--- src/frontends/qt4/GuiWorkArea.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index 7c49cb794e..d5595a9ea4 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -1528,7 +1528,7 @@ void TabWorkArea::closeCurrentBuffer() } -void TabWorkArea::closeCurrentTab() +void TabWorkArea::hideCurrentTab() { GuiWorkArea * wa; if (clicked_tab_ == -1) @@ -1551,7 +1551,7 @@ void TabWorkArea::closeTab(int index) wa = dynamic_cast(widget(index)); LASSERT(wa, /**/); } - wa->view().hideWorkArea(wa); + wa->view().closeWorkArea(wa); } @@ -1763,7 +1763,7 @@ void TabWorkArea::showContextMenu(const QPoint & pos) // show tab popup QMenu popup; popup.addAction(QIcon(getPixmap("images/", "hidetab", "png")), - qt_("Hide tab"), this, SLOT(closeCurrentTab())); + qt_("Hide tab"), this, SLOT(hideCurrentTab())); popup.addAction(QIcon(getPixmap("images/", "closetab", "png")), qt_("Close tab"), this, SLOT(closeCurrentBuffer())); popup.exec(tabBar()->mapToGlobal(pos)); diff --git a/src/frontends/qt4/GuiWorkArea.h b/src/frontends/qt4/GuiWorkArea.h index 1f44c5cef5..e5877a4ceb 100644 --- a/src/frontends/qt4/GuiWorkArea.h +++ b/src/frontends/qt4/GuiWorkArea.h @@ -320,8 +320,8 @@ Q_SIGNALS: public Q_SLOTS: /// close current buffer, or the one given by \c clicked_tab_ void closeCurrentBuffer(); - /// close current tab, or the one given by \c clicked_tab_ - void closeCurrentTab(); + /// hide current tab, or the one given by \c clicked_tab_ + void hideCurrentTab(); /// close the tab given by \c index void closeTab(int index); /// -- 2.39.2