]> git.lyx.org Git - features.git/commitdiff
Among other problems still left. At least close the right tab if you use the context...
authorVincent van Ravesteijn <vfr@lyx.org>
Sat, 15 Aug 2009 14:07:05 +0000 (14:07 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sat, 15 Aug 2009 14:07:05 +0000 (14:07 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31050 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiView.h
src/frontends/qt4/GuiWorkArea.cpp

index 034e9c55892cf93abcac88e0b0720c6186d4e51a..74136915f6d84fe3bcbdc6b60ccbd235741f0cd7 100644 (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);
 }
 
 
index 29e3021298e02c19e672efdccd4f9503177cf90d..24156b1805a564c29c2bbb5993ca0c8a7fe0e172 100644 (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?
index 4c93a33a52509d6556b15f82faf496f24220376b..d0c04b7d3de6a7f91db81e78083c93a570cbc69b 100644 (file)
@@ -1539,7 +1539,7 @@ void TabWorkArea::closeCurrentTab()
                wa = dynamic_cast<GuiWorkArea *>(widget(clicked_tab_));
                LASSERT(wa, /**/);
        }
-       wa->view().hideBuffer();
+       wa->view().hideWorkArea(wa);
 }
 
 ///