}
-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);
}
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?
wa = dynamic_cast<GuiWorkArea *>(widget(clicked_tab_));
LASSERT(wa, /**/);
}
- wa->view().hideBuffer();
+ wa->view().hideWorkArea(wa);
}
///