Re: An annoying problem with automatic update of reference.

2009-02-18 Thread rgheck
Bo Peng wrote: PS. I don't like this way to insert labels. A) it seems prone for bugs, B) the label is not shown on the screen. PS2. I can't think of a good alternative right now. Attached is a patch that fixes the bug. The only question I have is whether or not CutAndPaste.cpp is the bes

Re: An annoying problem with automatic update of reference.

2009-02-18 Thread rgheck
Bo Peng wrote: PS. I don't like this way to insert labels. A) it seems prone for bugs, B) the label is not shown on the screen. PS2. I can't think of a good alternative right now. Attached is a patch that fixes the bug. The only question I have is whether or not CutAndPaste.cpp is the bes

Re: An annoying problem with automatic update of reference.

2009-02-18 Thread Richard Heck
Vincent van Ravesteijn - TNW wrote: We thought you were just talking about normal labels. So the problem is that the mechanism that changes duplicate labels on copying isn't working with the labels that go with listings child docs. That's what we need to fix, since we don't want dup

Re: An annoying problem with automatic update of reference.

2009-02-18 Thread Bo Peng
> > PS. I don't like this way to insert labels. A) it seems prone for bugs, > B) the label is not shown on the screen. > > PS2. I can't think of a good alternative right now. Attached is a patch that fixes the bug. The only question I have is whether or not CutAndPaste.cpp is the best place to upd

Re: An annoying problem with automatic update of reference.

2009-02-18 Thread Abdelrazak Younes
Bo Peng wrote: We thought you were just talking about normal labels. So the problem is that the mechanism that changes duplicate labels on copying isn't working with the labels that go with listings child docs. That's what we need to fix, since we don't want duplicate labels. Yep, I remem

RE: An annoying problem with automatic update of reference.

2009-02-18 Thread Vincent van Ravesteijn - TNW
>> We thought you were just talking about normal labels. So the problem >> is that the mechanism that changes duplicate labels on copying isn't >> working with the labels that go with listings child docs. That's what >> we need to fix, since we don't want duplicate labels. > >Yep, I remember th

Re: An annoying problem with automatic update of reference.

2009-02-18 Thread Bo Peng
>> We thought you were just talking about normal labels. So the problem is >> that the mechanism that changes duplicate labels on copying isn't working >> with the labels that go with listings child docs. That's what we need to >> fix, since we don't want duplicate labels. > > Yep, I remember this

Re: An annoying problem with automatic update of reference.

2009-02-18 Thread Abdelrazak Younes
Richard Heck wrote: Bo Peng wrote: Well, I'm using the 1.6.1 release.. .. and I really can't get two labels with the same name. OK. I am using LyX svn/branch, svnversion 28539, flash screen shows version 1.6.2svn. Now repeat after me :-) 1. create a new document 2. insert File->Child d

Re: An annoying problem with automatic update of reference.

2009-02-18 Thread Richard Heck
Bo Peng wrote: Well, I'm using the 1.6.1 release.. .. and I really can't get two labels with the same name. OK. I am using LyX svn/branch, svnversion 28539, flash screen shows version 1.6.2svn. Now repeat after me :-) 1. create a new document 2. insert File->Child document->program list

Re: An annoying problem with automatic update of reference.

2009-02-18 Thread Bo Peng
>>3. insert cross-reference a. >>4. select the listings inset, copy, paste, >>5. click the copied listings. **I still see label a.** > > This is a bug. > > The label should have changed to "a-1" with a warning message (to be > consistent with the 'normal' labels). I see. The problem with InsetList

RE: An annoying problem with automatic update of reference.

2009-02-18 Thread Vincent van Ravesteijn - TNW
> Now repeat after me :-) > >1. create a new document >2. insert File->Child document->program listing, with label a. (Fake filename) Here we differ.. I just inserted a program listing with "Insert->Program Listing", sorry ;-) >3. insert cross-reference a. >4. select the listings inset, copy,

Re: An annoying problem with automatic update of reference.

2009-02-18 Thread Richard Heck
Bo Peng wrote: 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

Re: An annoying problem with automatic update of reference.

2009-02-18 Thread Bo Peng
> Well, I'm using the 1.6.1 release.. > > .. and I really can't get two labels with the same name. OK. I am using LyX svn/branch, svnversion 28539, flash screen shows version 1.6.2svn. Now repeat after me :-) 1. create a new document 2. insert File->Child document->program listing, with label a.

RE: An annoying problem with automatic update of reference.

2009-02-18 Thread Vincent van Ravesteijn - TNW
>> If I copy a Listing with a label, the label is renamed to something >> else in order not to have two labels with the same name. Then renaming >> this new label should not have any effect on the existing references. > >This is not the case for branch. I do not have trunk to test. > >Bo > Well

Re: An annoying problem with automatic update of reference.

2009-02-18 Thread Bo Peng
> If I copy a Listing with a label, the label is renamed to something else > in order not to have two labels with the same name. Then renaming this > new label should not have any effect on the existing references. This is not the case for branch. I do not have trunk to test. Bo

Re: An annoying problem with automatic update of reference.

2009-02-18 Thread Bo Peng
> 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' Ins

RE: An annoying problem with automatic update of reference.

2009-02-18 Thread Vincent van Ravesteijn - TNW
>Dear list, > >If I have a document with a reference to a program listing, > >Ref:A Listing_with_Label_A > >If I copy Listing_with_Label_A to another listing and change >its label to B. Ref:A will be automatically changed to B. That >is to say > >Ref:B Listing_with_Label_A Listing_with

An annoying problem with automatic update of reference.

2009-02-18 Thread Bo Peng
Dear list, If I have a document with a reference to a program listing, Ref:A Listing_with_Label_A If I copy Listing_with_Label_A to another listing and change its label to B. Ref:A will be automatically changed to B. That is to say Ref:B Listing_with_Label_A Listing_with_Label_B. Doe