View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015132 | Scribus | Internal | public | 2018-02-06 07:41 | 2018-02-06 08:05 |
Reporter | u ltd. | Assigned To | jghali | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | duplicate | ||
Platform | amd64 | OS | alike debian | OS Version | 9 |
Product Version | 1.5.4.svn | ||||
Summary | 0015132: Ensure unique name when instantiating PageItem | ||||
Description | Ensure unique name when instantiating PageItem object. | ||||
Steps To Reproduce | 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 | ||||
Additional Information | Patch in plaintext: 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); | ||||
Tags | No tags attached. | ||||
Patch | Yes | ||||
|
scribus-20180205-095552-jonas-uniquename.patch (562 bytes)
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); |
|
Duplicate of 0011926. 0011926 patch is simpler and hence has my preference. |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-02-06 07:41 | u ltd. | New Issue | |
2018-02-06 07:41 | u ltd. | File Added: scribus-20180205-095552-jonas-uniquename.patch | |
2018-02-06 08:05 | jghali | Assigned To | => jghali |
2018-02-06 08:05 | jghali | Status | new => resolved |
2018-02-06 08:05 | jghali | Resolution | open => duplicate |
2018-02-06 08:05 | jghali | Note Added: 0044926 | |
2018-02-06 08:05 | jghali | Relationship added | duplicate of 0011926 |
2018-02-06 08:05 | jghali | Status | resolved => closed |