r20416 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Wed Sep 23 18:39:04 UTC 2015


Author: jghali
Date: Wed Sep 23 18:39:04 2015
New Revision: 20416

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20416
Log:
#13365: Rename action is wrongly recorded in Action History

Modified:
    trunk/Scribus/scribus/pageitem.cpp

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20416&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Wed Sep 23 18:39:04 2015
@@ -2338,16 +2338,16 @@
 		p->beginLayer(1.0 - m_softShadowOpacity, m_softShadowBlendMode);
 	if (!hasFill())
 	{
-		double transF = fillTransparency();
-		double transS = lineTransparency();
-		bool savedShadow = hasSoftShadow();
+		double fillTrans_Old = fillTransparency();
+		double lineTrans_Old = lineTransparency();
+		bool   shadow_Old = hasSoftShadow();
 		double rotation_Old = m_rotation;
+		fillTransparencyVal = 0.0;
+		lineTransparencyVal = 0.0;
+		m_rotation = 0;
 		m_hasSoftShadow = false;
-		m_rotation = 0;
 		isEmbedded = true;
 		invalid = true;
-		fillTransparencyVal = 0.0;
-		lineTransparencyVal = 0.0;
 		p->save();
 		p->translate(m_softShadowXOffset, m_softShadowYOffset);
 		DrawObj(p, QRectF());
@@ -2364,11 +2364,11 @@
 			p->endLayer();
 			p->restore();
 		}
-		fillTransparencyVal = transF;
-		lineTransparencyVal = transS;
 		isEmbedded = false;
+		fillTransparencyVal = fillTrans_Old;
+		lineTransparencyVal = lineTrans_Old;
 		m_rotation = rotation_Old;
-		m_hasSoftShadow = savedShadow;
+		m_hasSoftShadow = shadow_Old;
 	}
 	else
 	{
@@ -2964,7 +2964,7 @@
 	AutoName=false;
 	if (UndoManager::undoEnabled())
 	{
-		SimpleState *ss = new SimpleState(Um::Rename, QString(Um::FromTo).arg(AnName).arg(newName));
+		SimpleState *ss = new SimpleState(Um::Rename, QString(Um::FromTo).arg(oldName).arg(newName));
 		ss->set("OLD_NAME", oldName);
 		ss->set("NEW_NAME", newName);
 		undoManager->action(this, ss);




More information about the scribus-commit mailing list