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
This commit is contained in:
Abdelrazak Younes 2010-12-05 01:18:32 +00:00
parent ae7bcd3312
commit 9cf9f86b8f
2 changed files with 3 additions and 14 deletions

View 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;
}

View 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);