]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/TocWidget.cpp
Amend f441590c
[lyx.git] / src / frontends / qt4 / TocWidget.cpp
index d0ea0d30309d160eb0e880bf01faa574ec6ea689..bb15f31e2b71bf9ca7dca027c130aa4267856c0f 100644 (file)
@@ -52,10 +52,10 @@ TocWidget::TocWidget(GuiView & gui_view, QWidget * parent)
 {
        setupUi(this);
 
-       moveOutTB->setIcon(QIcon(getPixmap("images/", "promote", "svgz,png")));
-       moveInTB->setIcon(QIcon(getPixmap("images/", "demote", "svgz,png")));
-       moveUpTB->setIcon(QIcon(getPixmap("images/", "up", "svgz,png")));
-       moveDownTB->setIcon(QIcon(getPixmap("images/", "down", "svgz,png")));
+       moveOutTB->setIcon(QIcon(getPixmap("images/", "outline-out", "svgz,png")));
+       moveInTB->setIcon(QIcon(getPixmap("images/", "outline-in", "svgz,png")));
+       moveUpTB->setIcon(QIcon(getPixmap("images/", "outline-up", "svgz,png")));
+       moveDownTB->setIcon(QIcon(getPixmap("images/", "outline-down", "svgz,png")));
        updateTB->setIcon(QIcon(getPixmap("images/", "reload", "svgz,png")));
 
        // avoid flickering
@@ -119,16 +119,12 @@ Inset * TocWidget::itemInset() const
 
        else if (current_type_ == "branch"
                         || current_type_ == "index"
-                        || current_type_ == "change")
+                        || current_type_ == "change"
+                        || current_type_ == "table" 
+                    || current_type_ == "listing"
+                    || current_type_ == "figure")
                inset = &dit.inset();
 
-       else if (current_type_ == "table" 
-                    || current_type_ == "listing"
-                    || current_type_ == "figure") {
-               DocIterator tmp_dit(dit);
-               tmp_dit.pop_back();
-               inset = &tmp_dit.inset();
-       }
        return inset;
 }
 
@@ -157,9 +153,10 @@ bool TocWidget::getStatus(Cursor & cur, FuncRequest const & cmd,
 
        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_REFERENCE, item.asString());
+               FuncRequest label_copy(LFUN_LABEL_COPY_AS_REFERENCE, item.str());
                if (inset)
                        return inset->getStatus(cur, label_copy, status);
+               break;
        }
 
        default:
@@ -201,7 +198,7 @@ void TocWidget::doDispatch(Cursor & cur, FuncRequest const & cmd)
 
        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_REFERENCE, item.asString());
+               FuncRequest label_copy(LFUN_LABEL_COPY_AS_REFERENCE, item.str());
                if (inset)
                        inset->dispatch(cur, label_copy);
                break;