diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 034e9c5589..74136915f6 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -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); } diff --git a/src/frontends/qt4/GuiView.h b/src/frontends/qt4/GuiView.h index 29e3021298..24156b1805 100644 --- a/src/frontends/qt4/GuiView.h +++ b/src/frontends/qt4/GuiView.h @@ -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? diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index 4c93a33a52..d0c04b7d3d 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -1539,7 +1539,7 @@ void TabWorkArea::closeCurrentTab() wa = dynamic_cast(widget(clicked_tab_)); LASSERT(wa, /**/); } - wa->view().hideBuffer(); + wa->view().hideWorkArea(wa); } ///