From 9cf9f86b8fc1d28be8e5d31b3d810495a76d5944 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sun, 5 Dec 2010 01:18:32 +0000 Subject: [PATCH] Move buffer dispatching code from GuiView::dispatchToBufferView() to BufferView::dispatch(). The execution order bv -> doc_bv -> buffer -> doc_buffer was artificial and not important AFAIU. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36734 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.cpp | 5 +++-- src/frontends/qt4/GuiView.cpp | 12 ------------ 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index d973bbf83b..b8971fc98e 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1879,13 +1879,14 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) } default: - dispatched = false; + // OK, so try the Buffer itself... + buffer_.dispatch(cmd, dr); + dispatched = dr.dispatched(); break; } buffer_.undo().endUndoGroup(); dr.dispatched(dispatched); - return; } diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index d2fc7b04fa..554fd90afc 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -3037,18 +3037,6 @@ void GuiView::dispatchToBufferView(FuncRequest const & cmd, DispatchResult & dr) return; } - // OK, so try the current Buffer itself... - bv->buffer().dispatch(cmd, dr); - if (dr.dispatched()) - return; - - // and with the document Buffer. - if (doc_bv) { - doc_bv->buffer().dispatch(cmd, dr); - if (dr.dispatched()) - return; - } - // Then let the current Cursor dispatch its own actions. bv->cursor().dispatch(cmd); -- 2.39.2