No need for the new LyXView::selectDocumentBuffer() method, same thing may be done with LFUN_SWITCH_BUFFER (vfr advice).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32739 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Tommaso Cucinotta 2010-01-01 11:14:01 +00:00
parent c04850645e
commit 9e5a12b905
4 changed files with 2 additions and 14 deletions

View File

@ -57,10 +57,6 @@ public:
virtual BufferView const * documentBufferView() const = 0;
//@}
/// Find or create buffer view and WorkArea for supplied document
/// buffer, and make it current.
virtual void selectDocumentBuffer(Buffer const * p_buf) = 0;
/// display a message in the view
virtual void message(docstring const &) = 0;

View File

@ -3542,11 +3542,6 @@ Dialog * GuiView::build(string const & name)
}
void GuiView::selectDocumentBuffer(Buffer const * p_buf) {
setBuffer(const_cast<Buffer *>(p_buf));
}
} // namespace frontend
} // namespace lyx

View File

@ -283,10 +283,6 @@ public:
///
void disconnectDialog(std::string const & name);
/// Find or create buffer view and WorkArea for supplied document
/// buffer and make it current.
void selectDocumentBuffer(Buffer const * p_buf);
private:
///
void saveLayout() const;

View File

@ -1303,7 +1303,8 @@ bool findAdv(BufferView * bv, FindAndReplaceOptions const & opt)
LYXERR(Debug::FIND, "Putting selection at buf=" << matchAdv.p_buf
<< "cur=" << cur << " with len: " << match_len);
theApp()->currentWindow()->selectDocumentBuffer(matchAdv.p_buf);
lyx::dispatch(FuncRequest(LFUN_BUFFER_SWITCH,
matchAdv.p_buf->absFileName()));
bv = theApp()->currentWindow()->documentBufferView();
bv->putSelectionAt(cur, match_len, ! opt.forward);