mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
replace BufferView::reload() uses with LyXFunc::reloadBuffer().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16727 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7cc0983ee2
commit
5554e9ee28
@ -278,13 +278,6 @@ bool BufferView::loadLyXFile(FileName const & filename, bool tolastfiles)
|
||||
}
|
||||
|
||||
|
||||
void BufferView::reload()
|
||||
{
|
||||
if (theBufferList().close(buffer_, false))
|
||||
loadLyXFile(FileName(buffer_->fileName()));
|
||||
}
|
||||
|
||||
|
||||
void BufferView::resize()
|
||||
{
|
||||
if (!buffer_)
|
||||
|
@ -93,8 +93,6 @@ public:
|
||||
/// resize the BufferView.
|
||||
void resize();
|
||||
|
||||
/// redisplay the referenced buffer.
|
||||
void reload();
|
||||
/// load a buffer into the view.
|
||||
bool loadLyXFile(support::FileName const & name, bool tolastfiles = true);
|
||||
|
||||
|
@ -899,7 +899,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
text, 0, 1, _("&Revert"), _("&Cancel"));
|
||||
|
||||
if (ret == 0)
|
||||
view()->reload();
|
||||
reloadBuffer();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1133,7 +1133,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
if (lyx_view_->buffer()->lyxvc().inUse()
|
||||
&& !lyx_view_->buffer()->isReadonly()) {
|
||||
lyx_view_->buffer()->lyxvc().checkIn();
|
||||
view()->reload();
|
||||
reloadBuffer();
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1144,20 +1144,20 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
if (lyx_view_->buffer()->lyxvc().inUse()
|
||||
&& lyx_view_->buffer()->isReadonly()) {
|
||||
lyx_view_->buffer()->lyxvc().checkOut();
|
||||
view()->reload();
|
||||
reloadBuffer();
|
||||
}
|
||||
break;
|
||||
|
||||
case LFUN_VC_REVERT:
|
||||
BOOST_ASSERT(lyx_view_ && lyx_view_->buffer());
|
||||
lyx_view_->buffer()->lyxvc().revert();
|
||||
view()->reload();
|
||||
reloadBuffer();
|
||||
break;
|
||||
|
||||
case LFUN_VC_UNDO_LAST:
|
||||
BOOST_ASSERT(lyx_view_ && lyx_view_->buffer());
|
||||
lyx_view_->buffer()->lyxvc().undoLast();
|
||||
view()->reload();
|
||||
reloadBuffer();
|
||||
break;
|
||||
|
||||
// --- buffers ----------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user