case LFUN_OUTLINE_IN:
case LFUN_OUTLINE_OUT:
case LFUN_SECTION_SELECT:
- status.setEnabled(true);
+ status.setEnabled(item.dit() != 0);
return true;
- case LFUN_LABEL_COPY_AS_REF: {
+ case LFUN_LABEL_COPY_AS_REFERENCE: {
// For labels in math, we need to supply the label as a string
- FuncRequest label_copy(LFUN_LABEL_COPY_AS_REF, item.asString());
+ FuncRequest label_copy(LFUN_LABEL_COPY_AS_REFERENCE, item.asString());
if (inset)
return inset->getStatus(cur, label_copy, status);
}
{
case LFUN_CHANGE_ACCEPT:
case LFUN_CHANGE_REJECT:
+ dispatch(item.action());
+ cur.dispatch(tmpcmd);
+ break;
+
case LFUN_SECTION_SELECT:
dispatch(item.action());
cur.dispatch(tmpcmd);
+ // necessary to get the selection drawn.
+ cur.buffer()->changed(true);
+ gui_view_.setFocus();
break;
- case LFUN_LABEL_COPY_AS_REF: {
+ case LFUN_LABEL_COPY_AS_REFERENCE: {
// For labels in math, we need to supply the label as a string
- FuncRequest label_copy(LFUN_LABEL_COPY_AS_REF, item.asString());
+ FuncRequest label_copy(LFUN_LABEL_COPY_AS_REFERENCE, item.asString());
if (inset)
inset->dispatch(cur, label_copy);
break;
}
-
+
case LFUN_OUTLINE_UP:
case LFUN_OUTLINE_DOWN:
case LFUN_OUTLINE_IN:
}
+#if 0
/* FIXME (Ugras 17/11/06):
I have implemented a indexDepth function to get the model indices. In my
opinion, somebody should derive a new qvariant class for tocModelItem
return index.parent() == QModelIndex()
? depth : indexDepth(index.parent(), depth);
}
-
+#endif
void TocWidget::on_depthSL_valueChanged(int depth)
{