TOC context menu (part 4)

* TocWidget: Relay the LFUNs to the appropriate inset.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29165 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-04-09 18:51:07 +00:00
parent ed42a06abb
commit 80ee77ff85

View File

@ -97,6 +97,17 @@ void TocWidget::showContextMenu(const QPoint & pos)
void TocWidget::doDispatch(Cursor & cur, FuncRequest const & cmd)
{
QModelIndex const & index = tocTV->currentIndex();
TocItem const & item =
gui_view_.tocModels().currentItem(current_type_, index);
DocIterator const & dit = item.dit();
Inset * inset = 0;
if (current_type_ == "label")
inset = dit.nextInset();
if (inset)
inset->dispatch(cur, FuncRequest(cmd));
}