]> git.lyx.org Git - features.git/commitdiff
LyXView::loadLyXFile(): only add a new work area if the file is not already loaded.
authorAbdelrazak Younes <younes@lyx.org>
Fri, 24 Aug 2007 07:19:40 +0000 (07:19 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 24 Aug 2007 07:19:40 +0000 (07:19 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19768 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/LyXView.cpp

index 91cee4a1206759cb80e692bc6f0a5ddf9ddf65dc..f36cc12b71ac080249a8c6281a4421e8370874d5 100644 (file)
@@ -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) {