]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetIndex.cpp
InsetTabular.cpp: fix #6585 also for wrapped floats - thanks Vincent
[lyx.git] / src / insets / InsetIndex.cpp
index 384e88cb105f8eedfa235c8d3b3fc20f26e18544..233495bea137aa484929782e24f13f1a4aa589af 100644 (file)
@@ -36,6 +36,7 @@
 #include "frontends/alert.h"
 
 #include <ostream>
+#include <algorithm>
 
 using namespace std;
 using namespace lyx::support;
@@ -210,6 +211,9 @@ void InsetIndex::doDispatch(Cursor & cur, FuncRequest & cmd)
                InsetIndexParams params;
                InsetIndex::string2params(to_utf8(cmd.argument()), params);
                params_.index = params.index;
+               // what we really want here is a TOC update, but that means
+               // a full buffer update
+               cur.forceBufferUpdate();
                break;
        }
 
@@ -369,6 +373,7 @@ void InsetIndex::validate(LaTeXFeatures & features) const
            && !params_.index.empty()
            && params_.index != "idx")
                features.require("splitidx");
+       InsetCollapsable::validate(features);
 }
 
 
@@ -420,7 +425,7 @@ void InsetIndexParams::read(Lexer & lex)
 ///////////////////////////////////////////////////////////////////////
 
 InsetPrintIndex::InsetPrintIndex(Buffer * buf, InsetCommandParams const & p)
-       : InsetCommand(buf, p, "index_print")
+       : InsetCommand(buf, p)
 {}
 
 
@@ -488,10 +493,9 @@ void InsetPrintIndex::doDispatch(Cursor & cur, FuncRequest & cmd)
                }
                InsetCommandParams p(INDEX_PRINT_CODE);
                // FIXME UNICODE
-               InsetCommand::string2params("index_print",
-                       to_utf8(cmd.argument()), p);
+               InsetCommand::string2params(to_utf8(cmd.argument()), p);
                if (p.getCmdName().empty()) {
-                       cur.noUpdate();
+                       cur.noScreenUpdate();
                        break;
                }
                setParams(p);
@@ -522,8 +526,7 @@ bool InsetPrintIndex::getStatus(Cursor & cur, FuncRequest const & cmd,
                } if (cmd.getArg(0) == "index_print"
                    && cmd.getArg(1) == "CommandInset") {
                        InsetCommandParams p(INDEX_PRINT_CODE);
-                       InsetCommand::string2params("index_print",
-                               to_utf8(cmd.argument()), p);
+                       InsetCommand::string2params(to_utf8(cmd.argument()), p);
                        if (suffixIs(p.getCmdName(), '*')) {
                                status.setEnabled(true);
                                status.setOnOff(false);