]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCommand.cpp
Fix bug #6315: counters in insets that don't produce output have ghost values.
[lyx.git] / src / insets / InsetCommand.cpp
index 9d9408fed5397e0a744f19ba5df8da183bfb5b5b..a429e27435fb1d4fbfe2af73d71568792e047fe9 100644 (file)
@@ -99,13 +99,13 @@ void InsetCommand::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetCommand::setParam(std::string const & name, docstring const & value)
+void InsetCommand::setParam(string const & name, docstring const & value)
 {
        p_[name] = value;
 }
 
 
-docstring const & InsetCommand::getParam(std::string const & name) const
+docstring const & InsetCommand::getParam(string const & name) const
 {
        return p_[name];
 }
@@ -146,6 +146,7 @@ void InsetCommand::doDispatch(Cursor & cur, FuncRequest & cmd)
        switch (cmd.action()) {
        case LFUN_INSET_MODIFY: {
                if (cmd.getArg(0) == "changetype") {
+                       cur.recordUndo();
                        p_.setCmdName(cmd.getArg(1));
                        cur.forceBufferUpdate();
                        initView();