[scribus] New ticket: ensure unique name
Jonas Bechtel
post at jbechtel.de
Mon Feb 5 10:25:07 UTC 2018
Hello there,
I have following new ticket:
Category: Internal
Reproducibility: everytime
Product version: 1.5.4.svn
Tags:
Patch: Yes
Files: patch attached in plain text, see below.
Summary: Ensure unique name when instantiating PageItem
Description:
You can create objects with duplicate name by following procedure
- Create an object, e. g. TextFrame -> Name is set to Text1 automatically
- Rename this object to Text2
- Create an same-type object -> New objects' name is set to Text2 automatically
With the patch below, this cann't happen.
BR
Jonas
__..--::°°""^^´´
Index: scribus/pageitem.cpp
===================================================================
--- scribus/pageitem.cpp (Revision 22369)
+++ scribus/pageitem.cpp (Arbeitskopie)
@@ -612,8 +612,9 @@
AnName = "Item";
break;
}
+ AnName = generateUniqueCopyName(AnName, false);
m_Doc->TotalItems++;
- AnName += tmp.setNum(m_Doc->TotalItems); // +" "+QDateTime::currentDateTime().toString();
+ //AnName += tmp.setNum(m_Doc->TotalItems); // +" "+QDateTime::currentDateTime().toString();
uniqueNr = m_Doc->TotalItems;
AutoName = true;
setUName(AnName);
More information about the scribus
mailing list