r21792 by jghali - #14638: combine polygons results in unexpected displacement

scribus-commit scribus-commit at lists.scribus.net
Wed Feb 22 18:26:39 UTC 2017


Author: jghali
Date: Wed Feb 22 18:26:38 2017
New Revision: 21792

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21792
Log:
#14638: combine polygons results in unexpected displacement

Modified:
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21792&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Wed Feb 22 18:26:38 2017
@@ -7252,7 +7252,8 @@
 	if (is)
 	{
 		m_Doc->view()->Deselect(true);
-		if (isUndo){
+		if (isUndo)
+		{
 			int pts = 0;
 			select();
 			for (int i = 0; i < is->getItem().first.size(); ++i)
@@ -7267,8 +7268,13 @@
 			Segments.clear();
 			FrameType = is->getInt("FRAMETYPE");
 			ClipEdited = is->getBool("CLIPEDITED");
+			bool oldRotMode = doc()->rotationMode();
+			doc()->setRotationMode(0);
 			doc()->adjustItemSize(this);
-		} else {
+			doc()->setRotationMode(oldRotMode);
+		}
+		else
+		{
 			select();
 			for (int i = 0; i < is->getItem().first.size(); ++i)
 				doc()->view()->SelectItem(is->getItem().first.at(i));

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21792&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Wed Feb 22 18:26:38 2017
@@ -15419,7 +15419,7 @@
 			ma2.translate(currItem->xPos(), currItem->yPos());
 			ma2.rotate(currItem->rotation());
 			ma2 = ma2.inverted();
-			ma=ma*ma2;
+			ma = ma * ma2;
 			bb->PoLine.map(ma);
 			m_undoManager->setUndoEnabled(true);
 			if (UndoManager::undoEnabled())
@@ -15428,7 +15428,10 @@
 			currItem->PoLine.setMarker();
 			currItem->PoLine.putPoints(currItem->PoLine.size(), bb->PoLine.size(), bb->PoLine);
 		}
+		int oldRotMode = m_rotMode;
+		m_rotMode = 0;
 		adjustItemSize(currItem);
+		m_rotMode = oldRotMode;
 		currItem->ContourLine = currItem->PoLine.copy();
 		m_undoManager->setUndoEnabled(true);
 		//FIXME: stop using m_View
@@ -15461,6 +15464,8 @@
 	if (UndoManager::undoEnabled())
 		transaction = m_undoManager->beginTransaction(Um::SelectionGroup, Um::IGroup, Um::SplitItem, "", Um::IGroup);
 	m_undoManager->setUndoEnabled(false);
+	int oldRotMode = m_rotMode;
+	m_rotMode = 0;
 	for (int i = 0; i < m_Selection->count(); ++i)
 	{
 		QList< int> itemsList;
@@ -15509,6 +15514,7 @@
 		}
 		m_undoManager->setUndoEnabled(false);
 	}
+	m_rotMode = oldRotMode;
 	m_undoManager->setUndoEnabled(true);
 	m_Selection->delaySignalsOff();
 	view()->Deselect(true);




More information about the scribus-commit mailing list