r16975 by fschmid - Final fix for Bug 10337: "In "points" (shape) edit palette : points moved with arrows become invisible"

scribus-commit scribus-commit at lists.scribus.net
Mon Nov 14 12:42:00 UTC 2011


Author: fschmid
Date: Mon Nov 14 12:41:59 2011
New Revision: 16975

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16975
Log:
Final fix for Bug 10337: "In "points" (shape) edit palette : points moved with arrows become invisible"

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

Modified: branches/Version135/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16975&path=/branches/Version135/Scribus/scribus/scribus.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/scribus.cpp (original)
+++ branches/Version135/Scribus/scribus/scribus.cpp Mon Nov 14 12:41:59 2011
@@ -1572,6 +1572,7 @@
 								int storedClRe = doc->nodeEdit.ClRe;
 								if ((doc->nodeEdit.SelNode.count() != 0) && (doc->nodeEdit.EdPoints))
 								{
+									QPolygonF poly;
 									for (int itm = 0; itm < doc->nodeEdit.SelNode.count(); ++itm)
 									{
 										FPoint np;
@@ -1583,7 +1584,13 @@
 										doc->nodeEdit.ClRe = clRe;
 										np = np - FPoint(moveBy, 0);
 										doc->nodeEdit.moveClipPoint(currItem, np);
+										poly.append(QPointF(np.x(), np.y()));
 									}
+									QMatrix m = currItem->getTransform();
+									poly = m.map(poly);
+									QRectF oldR = poly.boundingRect().adjusted(-5, -5, 10, 10);
+									QRectF newR(currItem->getBoundingRect());
+									doc->regionsChanged()->update(newR.unite(oldR));
 								}
 								doc->nodeEdit.ClRe = storedClRe;
 							}
@@ -1634,6 +1641,7 @@
 								int storedClRe = doc->nodeEdit.ClRe;
 								if ((doc->nodeEdit.SelNode.count() != 0) && (doc->nodeEdit.EdPoints))
 								{
+									QPolygonF poly;
 									for (int itm = 0; itm < doc->nodeEdit.SelNode.count(); ++itm)
 									{
 										FPoint np;
@@ -1645,7 +1653,13 @@
 										doc->nodeEdit.ClRe = clRe;
 										np = np + FPoint(moveBy, 0);
 										doc->nodeEdit.moveClipPoint(currItem, np);
+										poly.append(QPointF(np.x(), np.y()));
 									}
+									QMatrix m = currItem->getTransform();
+									poly = m.map(poly);
+									QRectF oldR = poly.boundingRect().adjusted(-5, -5, 10, 10);
+									QRectF newR(currItem->getBoundingRect());
+									doc->regionsChanged()->update(newR.unite(oldR));
 								}
 								doc->nodeEdit.ClRe = storedClRe;
 							}
@@ -1696,6 +1710,7 @@
 								int storedClRe = doc->nodeEdit.ClRe;
 								if ((doc->nodeEdit.SelNode.count() != 0) && (doc->nodeEdit.EdPoints))
 								{
+									QPolygonF poly;
 									for (int itm = 0; itm < doc->nodeEdit.SelNode.count(); ++itm)
 									{
 										FPoint np;
@@ -1707,7 +1722,13 @@
 										doc->nodeEdit.ClRe = clRe;
 										np = np - FPoint(0, moveBy);
 										doc->nodeEdit.moveClipPoint(currItem, np);
+										poly.append(QPointF(np.x(), np.y()));
 									}
+									QMatrix m = currItem->getTransform();
+									poly = m.map(poly);
+									QRectF oldR = poly.boundingRect().adjusted(-5, -5, 10, 10);
+									QRectF newR(currItem->getBoundingRect());
+									doc->regionsChanged()->update(newR.unite(oldR));
 								}
 								doc->nodeEdit.ClRe = storedClRe;
 							}
@@ -1758,6 +1779,7 @@
 								int storedClRe = doc->nodeEdit.ClRe;
 								if ((doc->nodeEdit.SelNode.count() != 0) && (doc->nodeEdit.EdPoints))
 								{
+									QPolygonF poly;
 									for (int itm = 0; itm < doc->nodeEdit.SelNode.count(); ++itm)
 									{
 										FPoint np;
@@ -1769,7 +1791,13 @@
 										doc->nodeEdit.ClRe = clRe;
 										np = np - FPoint(0, -moveBy);
 										doc->nodeEdit.moveClipPoint(currItem, np);
+										poly.append(QPointF(np.x(), np.y()));
 									}
+									QMatrix m = currItem->getTransform();
+									poly = m.map(poly);
+									QRectF oldR = poly.boundingRect().adjusted(-5, -5, 10, 10);
+									QRectF newR(currItem->getBoundingRect());
+									doc->regionsChanged()->update(newR.unite(oldR));
 								}
 								doc->nodeEdit.ClRe = storedClRe;
 							}




More information about the scribus-commit mailing list