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
This commit is contained in:
Abdelrazak Younes 2007-08-24 07:19:40 +00:00
parent ebff6bd6fb
commit 2cf5e9b563

View 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) {