View Issue Details

IDProjectCategoryView StatusLast Update
0009641ScribusUsabilitypublic2014-07-15 20:46
ReporterThaddeus Assigned Toale  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platform32 bitOSWinOS Version2k
Product Version1.4.0svn 
Fixed in Version1.4.5.svn 
Summary0009641: User-assigned Frame name is lost after reopening document.
DescriptionIt occurs when copying/cutting and pasting a frame with a user-assigned name: nothing unusual is seen on the canvas/palettes/story editor/etc, but when opening the document again, all pasted frame names are gone and replaced with default names, such as Text1, etc..
Steps To ReproduceTo reproduce:
Create new document
Insert Text Frame
Rename "Text1" to "TextUno"
Cut and Paste (frame "TextUno" shows up again)
Save document
Close document
Open document and there is a new name "Text1" ("TextUno" is gone)


To reproduce bis:
Create new document
Insert Text Frame
Rename "Text1" to "TextOne"
Copy and Paste (new frame "Copy of TextOne" shows up)
Save document
Close document
Open document and there is a new name "Text2" ("Copy of TextOne" is gone)
Tagspatch
Patch

Activities

cezaryece

2011-01-05 07:29

updater   ~0025277

I can confirm and add that clue of this bug is CUT/PASTE operation.
Without it name of frame is saved properly.
Seems pasting frame from clipboard show name of frame after change, but in fact frame has new name which is saved in file.

ale

2011-01-05 09:59

manager   ~0025278

Last edited: 2011-01-05 10:00

the attached patch has been brought to you by cezary.

i've tested it and it seems to work correctly.

"""
AutoName = false;
"""

fixes the reported bug.


the rest of the patch fixes the undo for the renaming action (it doesn't work in trunk!)

tested and works as expected on my system.

ale

2011-01-05 09:59

manager  

pageitem.patch (619 bytes)   
--- pageitem.cpp~trunk	2011-01-05 10:47:01.631170854 +0100
+++ pageitem.cpp	2011-01-05 10:48:40.770170015 +0100
@@ -2222,11 +2222,13 @@
 		return; // nothing to do -> return
 	if (newName.isEmpty())
 		return;
-	AnName = generateUniqueCopyName(newName);
+  QString oldName = AnName;
+  AnName = generateUniqueCopyName(newName);
+  AutoName = false;
 	if (UndoManager::undoEnabled())
 	{
 		SimpleState *ss = new SimpleState(Um::Rename, QString(Um::FromTo).arg(AnName).arg(newName));
-		ss->set("OLD_NAME", AnName);
+		ss->set("OLD_NAME", oldName);
 		ss->set("NEW_NAME", newName);
 		undoManager->action(this, ss);
 	}
pageitem.patch (619 bytes)   

jghali

2011-01-05 10:27

administrator   ~0025279

Last edited: 2011-01-05 10:29

The patch is incorrect as it will cause frames with automatic names to be set to non automatic name on copy/paste. PageItem::setItemName() must not change the AutoName property.

ale

2011-01-08 09:40

manager   ~0025307

i will look into it again, then.

cezaryece

2011-01-09 10:45

updater   ~0025313

I thought if I change frame name to my own one the AutoName should not be true.

fschmid

2011-11-23 16:05

administrator   ~0027260

This is fixed in 1.5.0svn

FirasH

2014-07-15 20:46

developer   ~0032769

Not reproducible with 1.4.5.svn (19334) and 1.5.0.svn (19343), closing.

Issue History

Date Modified Username Field Change
2011-01-04 22:49 Thaddeus New Issue
2011-01-05 07:29 cezaryece Note Added: 0025277
2011-01-05 09:59 ale Note Added: 0025278
2011-01-05 09:59 ale File Added: pageitem.patch
2011-01-05 10:00 ale Note Edited: 0025278
2011-01-05 10:18 ale Assigned To => ale
2011-01-05 10:18 ale Status new => confirmed
2011-01-05 10:27 jghali Note Added: 0025279
2011-01-05 10:29 jghali Note Edited: 0025279
2011-01-08 09:40 ale Note Added: 0025307
2011-01-09 10:45 cezaryece Note Added: 0025313
2011-10-24 21:04 malex Tag Attached: patch
2011-11-23 16:05 fschmid Note Added: 0027260
2014-07-15 12:32 Kunda Status confirmed => resolved
2014-07-15 12:32 Kunda Fixed in Version => 1.5.0svn
2014-07-15 12:32 Kunda Resolution open => fixed
2014-07-15 20:46 FirasH Note Added: 0032769
2014-07-15 20:46 FirasH Status resolved => closed
2014-07-15 20:46 FirasH Fixed in Version 1.5.0svn => 1.4.5.svn