Fix bug 3093:

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
This commit is contained in:
Abdelrazak Younes 2007-01-17 14:46:20 +00:00
parent 74f3ca3246
commit 7cc0983ee2
2 changed files with 11 additions and 1 deletions

View File

@ -1121,8 +1121,9 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
break; break;
if (!lyx_view_->buffer()->lyxvc().inUse()) { if (!lyx_view_->buffer()->lyxvc().inUse()) {
lyx_view_->buffer()->lyxvc().registrer(); lyx_view_->buffer()->lyxvc().registrer();
view()->reload(); reloadBuffer();
} }
updateFlags = Update::Force;
break; break;
case LFUN_VC_CHECK_IN: 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 // Each "lyx_view_" should have it's own message method. lyxview and
// the minibuffer would use the minibuffer, but lyxserver would // the minibuffer would use the minibuffer, but lyxserver would
// send an ERROR signal to its client. Alejandro 970603 // send an ERROR signal to its client. Alejandro 970603

View File

@ -120,6 +120,8 @@ private:
/// ///
void closeBuffer(); void closeBuffer();
/// ///
void reloadBuffer();
///
bool ensureBufferClean(BufferView * bv); bool ensureBufferClean(BufferView * bv);
}; };