]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetLabel.cpp
move updateLables to buffer
[features.git] / src / insets / InsetLabel.cpp
index 6a3be71a0205118378ba7de4ea5bcb578faf30e3..0b671b2c0fd6478ac7eb0967443ae14454587932 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -81,17 +81,16 @@ void InsetLabel::updateCommand(docstring const & new_label, bool updaterefs)
        buffer().undo().endUndoGroup();
 
        // We need an update of the Buffer reference cache. This is achieved by
-       // updateLabel().
-       lyx::updateLabels(buffer());
+       // updateLabels().
+       buffer().updateLabels();
 }
 
 
 ParamInfo const & InsetLabel::findInfo(string const & /* cmdName */)
 {
        static ParamInfo param_info_;
-       if (param_info_.empty()) {
+       if (param_info_.empty())
                param_info_.add("name", ParamInfo::LATEX_REQUIRED);
-       }
        return param_info_;
 }
 
@@ -146,7 +145,8 @@ void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd)
                        cur.noUpdate();
                        break;
                }
-               updateCommand(p["name"]);
+               if (p["name"] != params()["name"])
+                       updateCommand(p["name"]);
                break;
        }