]> git.lyx.org Git - features.git/commitdiff
Fix bug 3093:
authorAbdelrazak Younes <younes@lyx.org>
Wed, 17 Jan 2007 14:46:20 +0000 (14:46 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Wed, 17 Jan 2007 14:46:20 +0000 (14:46 +0000)
http://bugzilla.lyx.org/show_bug.cgi?id=3093

* LyXFunc:
  - reloadBuffer(): new method.
  - dispatch(LFUN_VC_REGISTER): use reloadBuffer().

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

src/lyxfunc.C
src/lyxfunc.h

index 6545b278c9480d7f855117be2dbabc03c3e6682d..ce172b6833b3b4a417e4dcc3edbad462bceb5348 100644 (file)
@@ -1121,8 +1121,9 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                break;
                        if (!lyx_view_->buffer()->lyxvc().inUse()) {
                                lyx_view_->buffer()->lyxvc().registrer();
-                               view()->reload();
+                               reloadBuffer();
                        }
+                       updateFlags = Update::Force;
                        break;
 
                case LFUN_VC_CHECK_IN:
@@ -2049,6 +2050,13 @@ void LyXFunc::closeBuffer()
 }
 
 
+void LyXFunc::reloadBuffer()
+{
+       FileName filename(lyx_view_->buffer()->fileName());
+       closeBuffer();
+       lyx_view_->loadLyXFile(filename);
+}
+
 // Each "lyx_view_" should have it's own message method. lyxview and
 // the minibuffer would use the minibuffer, but lyxserver would
 // send an ERROR signal to its client.  Alejandro 970603
index 14168adcefb632f64b4806739b8abfe7dab68082..d819fe27f59881286a4e83b69824a2c1fdfc9298 100644 (file)
@@ -120,6 +120,8 @@ private:
        ///
        void closeBuffer();
        ///
+       void reloadBuffer();
+       ///
        bool ensureBufferClean(BufferView * bv);
 };