Vincent van Ravesteijn wrote:
> > Index: src/frontends/qt4/GuiView.cpp
> > ===================================================================
> > --- src/frontends/qt4/GuiView.cpp     (Revision 28709)
> > +++ src/frontends/qt4/GuiView.cpp     (Arbeitskopie)
> > @@ -527,14 +527,29 @@
> >               if (b->parent()) {
> >                       // This is a child document, just close the tab
> > after saving // but keep the file loaded.
> > -                     if (!saveBuffer(*b)) {
> > +                     if (!closeBuffer(*b, false)) {
> >                               closing_ = false;
> >                               close_event->ignore();
> >                               return;
> >                       }
> > -                     removeWorkArea(d.current_work_area_);
> >                       continue;
> >               }
>
> Why is the above needed ? If it remains, please adjust the comment such
> that it fits the code.

If you close a child document while its master is still open, then only its 
view gets closed, but the child is still loaded.

The saveBuffer/removeWorkArea pair of calls did this, but did not ask the user 
before saving (this is the first part of the bug).

Now closeBuffer(*b, false) does exactly the same, only that it asks the user 
if changes should be saved ot not before issuing saveBuffer. I have removed 
the extra removeWorkArea call, because closeBuffer calls it anyway.

So the comment is still valid.

> > Index: src/Buffer.cpp
> > ===================================================================
> > --- src/Buffer.cpp    (Revision 28709)
> > +++ src/Buffer.cpp    (Arbeitskopie)
> > @@ -290,7 +290,7 @@
> >               Buffer * child = const_cast<Buffer *>(it->first);
> >               // The child buffer might have been closed already.
> >               if (theBufferList().isLoaded(child))
> > -                     theBufferList().releaseChild(this, child);      
> > +                     theBufferList().releaseChild(this, child);
> >       }
> >  
> >       // clear references to children in macro tables
>
> uhhmm whitespace ?

Yep.

Jürgen

Reply via email to