r16226 by jghali - #9650: correctly record item name change in undo

scribus-commit scribus-commit at lists.scribus.net
Sat Jan 8 16:09:14 CET 2011


Author: jghali
Date: Sat Jan  8 15:09:14 2011
New Revision: 16226

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16226
Log:
#9650: correctly record item name change in undo

Modified:
    branches/Version135/Scribus/scribus/pageitem.cpp

Modified: branches/Version135/Scribus/scribus/pageitem.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16226&path=/branches/Version135/Scribus/scribus/pageitem.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/pageitem.cpp (original)
+++ branches/Version135/Scribus/scribus/pageitem.cpp Sat Jan  8 15:09:14 2011
@@ -2215,11 +2215,12 @@
 		return; // nothing to do -> return
 	if (newName.isEmpty())
 		return;
+	QString oldName = AnName;
 	AnName = generateUniqueCopyName(newName);
 	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);
 	}




More information about the scribus-commit mailing list