From 5c2f819adcb6da5e8adb8d149426c95ddfbdee8e Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Fri, 10 Apr 2009 00:08:50 +0000 Subject: [PATCH] Make sure we also dispatch the doDispatch() and getResult() to Inset when Text could not process the request. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29173 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetText.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 12a7a2a12d..1f3f4683c5 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -261,8 +261,9 @@ void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd) if (cur.text() == &text_) text_.dispatch(cur, cmd); else - //FIXME we probably also want to dispatch to Inset when - //text_ could do nothing with the FuncRequest. + cur.undispatched(); + + if (!cur.result().dispatched()) Inset::doDispatch(cur, cmd); } @@ -285,10 +286,13 @@ bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd, default: // Dispatch only to text_ if the cursor is inside // the text_. It is not for context menus (bug 5797). + bool ret = false; if (cur.text() == &text_) - return text_.getStatus(cur, cmd, status); - else - return Inset::getStatus(cur, cmd, status); + ret = text_.getStatus(cur, cmd, status); + + if (!ret) + ret = Inset::getStatus(cur, cmd, status); + return ret; } } -- 2.39.2