From: Abdelrazak Younes Date: Fri, 24 Aug 2007 07:19:40 +0000 (+0000) Subject: LyXView::loadLyXFile(): only add a new work area if the file is not already loaded. X-Git-Tag: 1.6.10~8718 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2cf5e9b56308a85d48e6be5ef02a3009fad1faa6;p=features.git LyXView::loadLyXFile(): only add a new work area if the file is not already loaded. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19768 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/LyXView.cpp b/src/frontends/LyXView.cpp index 91cee4a120..f36cc12b71 100644 --- a/src/frontends/LyXView.cpp +++ b/src/frontends/LyXView.cpp @@ -139,7 +139,9 @@ Buffer * LyXView::loadLyXFile(FileName const & filename, bool tolastfiles) return 0; } - WorkArea * wa = addWorkArea(*newBuffer); + WorkArea * wa = workArea(*newBuffer); + if (wa == 0) + wa = addWorkArea(*newBuffer); // scroll to the position when the file was last closed if (lyxrc.use_lastfilepos) {