> Does it make sense to only do this if there is no Label_A in the
> document? I copy listings inset around a lot so that I do not have to
> re-specify some listings parameters, and the automatic change of
> references have been annoying.

With the attached patch, only the update of the 'first' InsetLabel
will update its associated references. Other copies will not because
these InsetLabels are not registered in buffer().

Does this patch make sense?
Bo



Index: src/insets/InsetLabel.cpp
===================================================================
--- src/insets/InsetLabel.cpp   (revision 28539)
+++ src/insets/InsetLabel.cpp   (working copy)
@@ -71,7 +71,7 @@
        buffer().undo().beginUndoGroup();
        setParam("name", label);

-       if (updaterefs) {
+       if (updaterefs && buffer().insetLabel(old_label) == this) {
                Buffer::References & refs = buffer().references(old_label);
                Buffer::References::iterator it = refs.begin();
                Buffer::References::iterator end = refs.end();

Reply via email to