mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
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:
parent
74f3ca3246
commit
7cc0983ee2
@ -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
|
||||
|
@ -120,6 +120,8 @@ private:
|
||||
///
|
||||
void closeBuffer();
|
||||
///
|
||||
void reloadBuffer();
|
||||
///
|
||||
bool ensureBufferClean(BufferView * bv);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user