Avoid useless double dispatch of cmd to same buffer (if bv and doc_bv are the same).

This also fixes #7442.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38383 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Tommaso Cucinotta 2011-04-14 21:39:47 +00:00
parent 5c93852e3c
commit bfc98a4faa

View File

@ -3063,7 +3063,7 @@ void GuiView::dispatchToBufferView(FuncRequest const & cmd, DispatchResult & dr)
// Try with the document BufferView dispatch if any.
BufferView * doc_bv = documentBufferView();
if (doc_bv) {
if (doc_bv && doc_bv != bv) {
doc_bv->dispatch(cmd, dr);
if (dr.dispatched())
return;