r19134 by craig - Tag Item Move and Rotate properly for undo/redo actions

scribus-commit scribus-commit at lists.scribus.net
Wed May 21 21:17:27 UTC 2014


Author: craig
Date: Wed May 21 21:17:26 2014
New Revision: 19134

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19134
Log:
Tag Item Move and Rotate properly for undo/redo actions

Modified:
    trunk/Scribus/scribus/pageitem.cpp

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19134&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Wed May 21 21:17:26 2014
@@ -4784,6 +4784,7 @@
 		SimpleState *ss = new SimpleState(Um::Move,
                                           QString(Um::MoveFromTo).arg(oldXpos).arg(oldYpos).arg(oldp).
 																  arg(m_xPos).arg(m_yPos).arg(newp), Um::IMove);
+		ss->set("ITEM_MOVE", "item_move");
 		ss->set("OLD_XPOS", oldXpos);
 		ss->set("OLD_YPOS", oldYpos);
 		ss->set("NEW_XPOS", m_xPos);
@@ -4854,6 +4855,7 @@
 		SimpleState *ss = new SimpleState(Um::Rotate,
 										  QString(Um::FromTo).arg(oldRot).arg(m_rotation),
 										  Um::IRotate);
+		ss->set("ITEM_ROTATE", "item_rotate");
 		ss->set("OLD_ROT", oldRot);
 		ss->set("NEW_ROT", m_rotation);
 		if (!isNoteFrame() || !asNoteFrame()->isAutoWelded())
@@ -4956,12 +4958,11 @@
 			restoreStartArrowScale(ss, isUndo);
 		else if (ss->contains("IMAGE_ROTATION"))
 			restoreImageRotation(ss, isUndo);
-//		else if (ss->contains("OLD_HEIGHT") || ss->contains("OLD_WIDTH"))
 		else if (ss->contains("ITEM_RESIZE"))
 			restoreResize(ss, isUndo);
-		else if (ss->contains("OLD_ROT"))
+		else if (ss->contains("ITEM_ROTATE"))
 			restoreRotate(ss, isUndo);
-		else if (ss->contains("OLD_XPOS"))
+		else if (ss->contains("ITEM_MOVE"))
 			restoreMove(ss, isUndo);
 		else if (ss->contains("FILL"))
 			restoreFill(ss, isUndo);




More information about the scribus-commit mailing list