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
This commit is contained in:
Vincent van Ravesteijn 2009-04-10 00:08:50 +00:00
parent d47e87f92f
commit 5c2f819adc

View File

@ -261,8 +261,9 @@ void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd)
if (cur.text() == &text_) if (cur.text() == &text_)
text_.dispatch(cur, cmd); text_.dispatch(cur, cmd);
else else
//FIXME we probably also want to dispatch to Inset when cur.undispatched();
//text_ could do nothing with the FuncRequest.
if (!cur.result().dispatched())
Inset::doDispatch(cur, cmd); Inset::doDispatch(cur, cmd);
} }
@ -285,10 +286,13 @@ bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd,
default: default:
// Dispatch only to text_ if the cursor is inside // Dispatch only to text_ if the cursor is inside
// the text_. It is not for context menus (bug 5797). // the text_. It is not for context menus (bug 5797).
bool ret = false;
if (cur.text() == &text_) if (cur.text() == &text_)
return text_.getStatus(cur, cmd, status); ret = text_.getStatus(cur, cmd, status);
else
return Inset::getStatus(cur, cmd, status); if (!ret)
ret = Inset::getStatus(cur, cmd, status);
return ret;
} }
} }