From 9e5a12b905db762bc61f9d298762f3bb7884c42f Mon Sep 17 00:00:00 2001 From: Tommaso Cucinotta Date: Fri, 1 Jan 2010 11:14:01 +0000 Subject: [PATCH] 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 --- src/frontends/LyXView.h | 4 ---- src/frontends/qt4/GuiView.cpp | 5 ----- src/frontends/qt4/GuiView.h | 4 ---- src/lyxfind.cpp | 3 ++- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/frontends/LyXView.h b/src/frontends/LyXView.h index 342e4dd820..6813d759bd 100644 --- a/src/frontends/LyXView.h +++ b/src/frontends/LyXView.h @@ -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; diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 2f7eb4aa18..13cb0c02e3 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -3542,11 +3542,6 @@ Dialog * GuiView::build(string const & name) } -void GuiView::selectDocumentBuffer(Buffer const * p_buf) { - setBuffer(const_cast(p_buf)); -} - - } // namespace frontend } // namespace lyx diff --git a/src/frontends/qt4/GuiView.h b/src/frontends/qt4/GuiView.h index 19f6b57051..44d491e80c 100644 --- a/src/frontends/qt4/GuiView.h +++ b/src/frontends/qt4/GuiView.h @@ -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; diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index e95f06e27f..4e3dd9c17c 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -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); -- 2.39.5