r19866 by craig - Various weld fixes, fix text and caption of Edit Weld form, #12148: fix action name

scribus-commit scribus-commit at lists.scribus.net
Mon Feb 23 19:29:50 UTC 2015


Author: craig
Date: Mon Feb 23 19:29:50 2015
New Revision: 19866

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19866
Log:
Various weld fixes, fix text and caption of Edit Weld form, #12148: fix action name

Modified:
    trunk/Scribus/scribus/actionmanager.cpp
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/ui/weldeditbase.ui

Modified: trunk/Scribus/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19866&path=/trunk/Scribus/scribus/actionmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/actionmanager.cpp (original)
+++ trunk/Scribus/scribus/actionmanager.cpp Mon Feb 23 19:29:50 2015
@@ -1604,7 +1604,7 @@
 	(*scrActions)["itemConvertToSymbolFrame"]->setTexts( tr("&Symbol"));
 	(*scrActions)["itemsUnWeld"]->setTexts( tr("Unweld Items"));
 	(*scrActions)["itemWeld"]->setTexts( tr("Weld Items"));
-	(*scrActions)["itemEditWeld"]->setTexts( tr("Edit Welded Item"));
+	(*scrActions)["itemEditWeld"]->setTexts( tr("Edit Weld"));
 
 	//Insert Menu
 	(*scrActions)["insertFrame"]->setTexts( tr("&Frames..."));

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19866&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Mon Feb 23 19:29:50 2015
@@ -10600,13 +10600,13 @@
 	for (int i = 0 ; i < weldList.count(); i++)
 	{
 		WeldingInfo wInf = weldList.at(i);
-		PageItem *pIt = wInf.weldItem;
-		if (pIt != except)
-		{
-			pIt->setXPos(pIt->xPos() + dX);
-			pIt->setYPos(pIt->yPos() + dY);
-			pIt->update();
-			pIt->moveWelded(dX, dY, this);
+		PageItem *item = wInf.weldItem;
+		if (item != except)
+		{
+			item->setXPos(item->xPos() + dX);
+			item->setYPos(item->yPos() + dY);
+			item->update();
+			item->moveWelded(dX, dY, this);
 		}
 	}
 	UndoManager::instance()->setUndoEnabled(true);
@@ -10636,41 +10636,40 @@
 	}
 	QPointF rotCenter = ma.map(QPointF(0,0));
 	QList<PageItem*> itemList = itemsWeldedTo(this);
-	for (int a = 0; a < itemList.count(); a++)
-	{
-		PageItem *pIt = itemList.at(a);
-		QLineF lin = QLineF(rotCenter, QPointF(pIt->xPos(), pIt->yPos()));
+	for (int i = 0; i < itemList.count(); i++)
+	{
+		PageItem *item = itemList.at(i);
+		QLineF lin = QLineF(rotCenter, QPointF(item->xPos(), item->yPos()));
 		lin.setAngle(lin.angle() - dR);
-		pIt->setXYPos(lin.p2().x(), lin.p2().y());
-		pIt->rotateBy(dR);
+		item->setXYPos(lin.p2().x(), lin.p2().y());
+		item->rotateBy(dR);
 	}
 	UndoManager::instance()->setUndoEnabled(true);
 }
 
 QList<PageItem*> PageItem::itemsWeldedTo(PageItem* except)
 {
-	QList<PageItem*> ret;
-	ret.clear();
+	QList<PageItem*> pageItemList;
 	for (int i = 0 ; i < weldList.count(); i++)
 	{
 		WeldingInfo wInf = weldList.at(i);
-		PageItem *pIt = wInf.weldItem;
-		if (pIt != except)
-		{
-			ret.append(pIt);
-			if (pIt->isWelded())
-				ret.append(pIt->itemsWeldedTo(this));
-		}
-	}
-	return ret;
+		PageItem *item = wInf.weldItem;
+		if (item != except)
+		{
+			pageItemList.append(item);
+			if (item->isWelded())
+				pageItemList.append(item->itemsWeldedTo(this));
+		}
+	}
+	return pageItemList;
 }
 
 void PageItem::setWeldPoint(double dX, double dY, PageItem *pItem)
 {
 	for (int i = 0 ; i < weldList.count(); i++)
 	{
-		PageItem *pIt = weldList[i].weldItem;
-		if (pIt == pItem)
+		PageItem *item = weldList[i].weldItem;
+		if (item == pItem)
 		{
 			weldList[i].weldPoint = FPoint(dX, dY);
 			return;

Modified: trunk/Scribus/scribus/ui/weldeditbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19866&path=/trunk/Scribus/scribus/ui/weldeditbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/weldeditbase.ui (original)
+++ trunk/Scribus/scribus/ui/weldeditbase.ui Mon Feb 23 19:29:50 2015
@@ -6,18 +6,18 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>129</width>
+    <width>151</width>
     <height>95</height>
    </rect>
   </property>
   <property name="windowTitle">
-   <string>Form</string>
+   <string>Edit Weld</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
     <widget class="QRadioButton" name="moveWeldPoint">
      <property name="text">
-      <string>Move weld Point</string>
+      <string>Move Weld Point</string>
      </property>
      <property name="checked">
       <bool>true</bool>




More information about the scribus-commit mailing list