Among other problems still left. At least close the right tab if you use the context menu.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31050 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-08-15 14:07:05 +00:00
parent da2599d8ed
commit 3c91fecb61
3 changed files with 6 additions and 6 deletions

View File

@ -1925,10 +1925,10 @@ bool GuiView::saveBuffer(Buffer & b)
}
bool GuiView::hideBuffer()
bool GuiView::hideWorkArea(GuiWorkArea * wa)
{
Buffer * buf = buffer();
return buf && closeBuffer(*buf, false);
Buffer & buf = wa->bufferView().buffer();
return closeBuffer(buf, false);
}

View File

@ -91,8 +91,8 @@ public:
void setBuffer(Buffer * b); ///< \c Buffer to set.
///
bool closeBuffer();
/// hides the buffer and makes sure it is clean
bool hideBuffer();
/// hides the workarea and makes sure it is clean
bool hideWorkArea(GuiWorkArea * wa);
/// load a document into the current workarea.
Buffer * loadDocument(support::FileName const & name, ///< File to load.
bool tolastfiles = true); ///< append to the "Open recent" menu?

View File

@ -1539,7 +1539,7 @@ void TabWorkArea::closeCurrentTab()
wa = dynamic_cast<GuiWorkArea *>(widget(clicked_tab_));
LASSERT(wa, /**/);
}
wa->view().hideBuffer();
wa->view().hideWorkArea(wa);
}
///