]> git.lyx.org Git - features.git/commitdiff
Move buffer dispatching code from GuiView::dispatchToBufferView() to BufferView:...
authorAbdelrazak Younes <younes@lyx.org>
Sun, 5 Dec 2010 01:18:32 +0000 (01:18 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sun, 5 Dec 2010 01:18:32 +0000 (01:18 +0000)
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
src/frontends/qt4/GuiView.cpp

index d973bbf83b7215840131078ec0b690e2a500c876..b8971fc98e02d0e1c3f7d4c5dba44e03d4cf3398 100644 (file)
@@ -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;
 }
 
 
index d2fc7b04fabf4c233a62e14471bf048d242aed41..554fd90afc03141c40ef5af7efdc14ec4d4f6b0f 100644 (file)
@@ -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);