From 5554e9ee284f11fb0b02587ff2775c0502db7cd4 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Wed, 17 Jan 2007 14:49:48 +0000 Subject: [PATCH] replace BufferView::reload() uses with LyXFunc::reloadBuffer(). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16727 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.C | 7 ------- src/BufferView.h | 2 -- src/lyxfunc.C | 10 +++++----- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/BufferView.C b/src/BufferView.C index 92ed1d8639..a9ec2eb305 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -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_) diff --git a/src/BufferView.h b/src/BufferView.h index 1ccf16ed1a..bceaf1f82f 100644 --- a/src/BufferView.h +++ b/src/BufferView.h @@ -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); diff --git a/src/lyxfunc.C b/src/lyxfunc.C index ce172b6833..6bea042318 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -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 ----------------------------------------