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
This commit is contained in:
Vincent van Ravesteijn 2009-10-31 18:14:21 +00:00
parent e8ec788924
commit 86b6bb9d18
2 changed files with 5 additions and 5 deletions

View File

@ -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<GuiWorkArea *>(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));

View File

@ -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);
///