> Author: spitz
> Date: Sat Dec  6 15:44:40 2008
> New Revision: 27781
>
> URL: http://www.lyx.org/trac/changeset/27781
> Log:
> * LyXFunc.cpp (reload):
>         - if the lyx_view_ has been detroyed, create a new one (fix bug
> 5389).
>
> Modified:
>     lyx-devel/trunk/src/LyXFunc.cpp
>
> Modified: lyx-devel/trunk/src/LyXFunc.cpp
> URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/LyXFunc.cpp?rev=27781
> ===========================================================================
>=== --- lyx-devel/trunk/src/LyXFunc.cpp (original)
> +++ lyx-devel/trunk/src/LyXFunc.cpp Sat Dec  6 15:44:40 2008
> @@ -1735,6 +1735,9 @@
>         // The user has already confirmed that the changes, if any, should
>         // be discarded. So we just release the Buffer and don't call
> closeBuffer(); theBufferList().release(lyx_view_->buffer());
> +       // if the lyx_view_ has been destroyed, create a new one
> +       if (!lyx_view_)
> +               theApp()->dispatch(FuncRequest(LFUN_WINDOW_NEW));
>         Buffer * buf = lyx_view_->loadDocument(filename);
>         docstring const disp_fn = makeDisplayPath(filename.absFilename());
>         docstring str;

I'm not sure if this approach is to be preferred in branch as well (instead of 
the one chosen in rev. 27780). Opinions?

Jürgen

Reply via email to