On Mon, Dec 11, 2006 at 11:01:54PM +0100, Peter Kümmel wrote:
> Index: src/frontends/qt4/GuiView.C
> ===================================================================
> --- src/frontends/qt4/GuiView.C (Revision 16247)
> +++ src/frontends/qt4/GuiView.C (Arbeitskopie)
> @@ -240,18 +240,28 @@
>
> void GuiView::closeEvent(QCloseEvent * close_event)
> {
> - theApp()->gui().unregisterView(id());
> - if (theApp()->gui().viewIds().empty())
> + if (theApp()->gui().viewIds().size() > 1)
> {
> + theApp()->gui().unregisterView(id());
> + close_event->accept();
> + }
> + else
> + {
> // this is the place where we leave the frontend.
> // it is the only point at which we start quitting.
> - saveGeometry();
> - theBufferList().quitWriteAll();
> - close_event->accept();
> - // quit the event loop
> - qApp->quit();
> + if (theBufferList().quitWriteAll())
> + {
> + theApp()->gui().unregisterView(id());
> + saveGeometry();
> + close_event->accept();
> + // quit the event loop
> + qApp->quit();
> + }
> + else
> + {
> + close_event->ignore();
> + }
> }
> - close_event->accept();
> }
Style of braces is not consistent with the rest of LyX.
Please correct that.
Andre'