]> git.lyx.org Git - features.git/commitdiff
Fix bug 3970: Include file crash
authorAbdelrazak Younes <younes@lyx.org>
Thu, 5 Jul 2007 08:18:25 +0000 (08:18 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 5 Jul 2007 08:18:25 +0000 (08:18 +0000)
The problem is that a screen update needs a bibtex key for proper rendering of the Citation. This key requires the master document to load all child document, which trigger an additional screen update, even when we don't switch buffer. The problem is that we are already in the process to update the screen, hence the crash.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18986 a592a061-630c-0410-9148-cb99ea01b6c8

src/LyXFunc.cpp

index 01b6984eff822f9b29509cead224dea91bc5915b..5c69ab76d155a52c6eec28501b021eb9ec688562 100644 (file)
@@ -1441,6 +1441,11 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        } else
                                lyx_view_->loadLyXFile(filename, true, true, autoOpen);
 
+                       // If a screen update is required (in case where auto_open is false), 
+                       // loadLyXFile() would have taken care of it already. Otherwise we shall 
+                       // reset the update flag because it can cause a circular problem.
+                       // See bug 3970.
+                       updateFlags = Update::None;
                        break;
                }