]> git.lyx.org Git - features.git/commitdiff
Let's get rid of this strange Buffer * construction. After that I introduced the...
authorVincent van Ravesteijn <vfr@lyx.org>
Sat, 15 Aug 2009 21:33:37 +0000 (21:33 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sat, 15 Aug 2009 21:33:37 +0000 (21:33 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31064 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index 3bbc8c6e4b30f0926e696b24be501286a88f57fa..e9e167af33d64cc0777428b219e2c74149f70d14 100644 (file)
@@ -609,8 +609,9 @@ bool GuiView::closeBufferAll(bool tolastopened)
 
                        GuiWorkArea * wa = twa->currentWorkArea();
                        bool const is_active_wa = active_wa == wa;
-                       Buffer * b = &wa->bufferView().buffer();
-                       if (b->parent()) {
+                       Buffer & b = wa->bufferView().buffer();
+
+                       if (b.parent()) {
                                // This is a child document, just close the tab
                                // after saving but keep the file loaded.
                                if (!closeWorkArea(wa, false, tolastopened, is_active_wa))
@@ -618,7 +619,7 @@ bool GuiView::closeBufferAll(bool tolastopened)
                                continue;
                        }
 
-                       vector<Buffer *> clist = b->getChildren();
+                       vector<Buffer *> clist = b.getChildren();
                        for (vector<Buffer *>::const_iterator it = clist.begin();
                                 it != clist.end(); ++it) {
                                if ((*it)->isClean())
@@ -637,7 +638,7 @@ bool GuiView::closeBufferAll(bool tolastopened)
 
                        // closeBuffer() needs buffer workArea still alive and
                        // set as currrent one, and destroys it
-                       if (b && !closeWorkArea(wa, close_buffer, tolastopened, is_active_wa))
+                       if (!closeWorkArea(wa, close_buffer, tolastopened, is_active_wa))
                                return false;
                }
        }