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:
Abdelrazak Younes 2007-01-17 14:49:48 +00:00
parent 7cc0983ee2
commit 5554e9ee28
3 changed files with 5 additions and 14 deletions

View File

@ -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_)

View File

@ -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);

View File

@ -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 ----------------------------------------