]> git.lyx.org Git - features.git/commitdiff
Branch-invert: Record undo and update Toc
authorGuillaume Munch <gm@lyx.org>
Tue, 12 Jul 2016 13:27:40 +0000 (14:27 +0100)
committerGuillaume Munch <gm@lyx.org>
Tue, 12 Jul 2016 13:27:40 +0000 (14:27 +0100)
src/insets/InsetBranch.cpp

index a87cf053379444f43973a0da4c5b4eb33f929a43..53007f604bfbd715971d2f5449a2df7ddbb4f5e9 100644 (file)
@@ -189,7 +189,11 @@ void InsetBranch::doDispatch(Cursor & cur, FuncRequest & cmd)
                break;
        }
        case LFUN_BRANCH_INVERT:
+               cur.recordUndoInset(this);
                params_.inverted = !params_.inverted;
+               // what we really want here is a TOC update, but that means
+               // a full buffer update
+               cur.forceBufferUpdate();
                break;
        case LFUN_BRANCH_ADD:
                lyx::dispatch(FuncRequest(LFUN_BRANCH_ADD, params_.branch));