[Scribus] Re: Item names not being saved (solution found?)
Wed Sep 10 20:54:50 CEST 2003
Keith Lancaster wrote:
> On Sun, 2003-09-07 at 22:45, Keith Lancaster wrote:
>>On Sun, 2003-09-07 at 00:07, Keith Lancaster wrote:
>>>Apologies if this has been discussed previously.
>>>I created a page with a number of text frames. After creating the text
>>>frames, I edited each one to give it a name, i.e., changed "Item1" to
>>>"problem_text", etc. After saving the file and reopening it, I found
>>>that the new names had not been saved. They had reverted to the earlier
>>>"Itemx" names. Is there a fix for this problem, or am I doing something
>>After looking into it a bit, I found the following in page.cpp:
>>if ((Buffer->AnName != "") && (!drag) && (b->isAnnotation))
>> b->AnName = Buffer->AnName;
>>The name of the item was correctly being saved, but do to the
>>isAnnotation requirement above, the name was not set for the item when
>>the page was loaded from the file.
>>If I simply comment out the isAnnotation section, the code works
>>correctly. I have just begun looking through the code, so I am not
>>certain what the real significance of the isAnnotation requirement is,
>>but removing the check allows the item names to be recalled.
> Have not gotten a response on this. Two questions:
>(1)is commenting this code out to change the logic going to create
> problems elsewhere,
You have found the right place for the bugfix. The only difficulty is that
we must find a way to keep the name unique. When loading a Document there are
no problems, but the same function is used to paste Elements into an existing
Doc and there is the possibility that the name already exists.
Unique names are required for the Scripter Plugin to find the correct Object.
>and (2) what is the policy on contributing to Scribus code? I am now building
> from cvs.
The best thing is to send patches along with a short description what that patch
does. Either to me or to Paul.
More information about the scribus