r16673 by craig - #9392: Fix contour line scaling by distance

scribus-commit scribus-commit at lists.scribus.net
Thu Jun 16 22:15:54 UTC 2011


Author: craig
Date: Thu Jun 16 22:15:54 2011
New Revision: 16673

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16673
Log:
#9392: Fix contour line scaling by distance

Modified:
    trunk/Scribus/scribus/filewatcher.cpp
    trunk/Scribus/scribus/scribusview.cpp
    trunk/Scribus/scribus/ui/nodeeditpalette.cpp

Modified: trunk/Scribus/scribus/filewatcher.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16673&path=/trunk/Scribus/scribus/filewatcher.cpp
==============================================================================
--- trunk/Scribus/scribus/filewatcher.cpp (original)
+++ trunk/Scribus/scribus/filewatcher.cpp Thu Jun 16 22:15:54 2011
@@ -202,7 +202,7 @@
 		}
 		else
 		{
-			qDebug()<<it.key();
+			//qDebug()<<it.key();
 			it.value().pending = false;
 			time = it.value().info.lastModified();
 			if (time != it.value().timeInfo)

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16673&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Thu Jun 16 22:15:54 2011
@@ -26,6 +26,7 @@
 #include "scconfig.h"
 
 #include <QColor>
+#include <QDebug>
 #include <QDrag>
 #include <QDragEnterEvent>
 #include <QDragLeaveEvent>
@@ -1400,10 +1401,18 @@
 			ma.shear(0, 0.017455);
 			break;
 		case 8:
-			ma.scale(1.0 - (scaling / 100.0), 1.0 - (scaling / 100.0));
+			{
+				double sx=(tp.x() - tp2.x() - scaling) / (tp.x() - tp2.x());
+				double sy=(tp.y() - tp2.y() - scaling) / (tp.y() - tp2.y());
+				ma.scale(sx, sy);
+			}
 			break;
 		case 9:
-			ma.scale(1.0 + (scaling / 100.0), 1.0 + (scaling / 100.0));
+			{
+				double sx=(tp.x() - tp2.x() + scaling) / (tp.x() - tp2.x());
+				double sy=(tp.y() - tp2.y() + scaling) / (tp.y() - tp2.y());
+				ma.scale(sx, sy);
+			}
 			break;
 		//10-13 are for scaling the contour line in shape edit mode
 		case 10:

Modified: trunk/Scribus/scribus/ui/nodeeditpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16673&path=/trunk/Scribus/scribus/ui/nodeeditpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/nodeeditpalette.cpp (original)
+++ trunk/Scribus/scribus/ui/nodeeditpalette.cpp Thu Jun 16 22:15:54 2011
@@ -466,13 +466,13 @@
 void NodePalette::doReduce()
 {
 	if (doc != 0)
-		view->TransformPoly(8, 1, scaleDistance->value()/unitGetRatioFromIndex(doc->unitIndex()));
+		view->TransformPoly(8, 1, value2pts(scaleDistance->value(),doc->unitIndex()));
 }
 
 void NodePalette::doEnlarge()
 {
 	if (doc != 0)
-		view->TransformPoly(9, 1, scaleDistance->value()/unitGetRatioFromIndex(doc->unitIndex()));
+		view->TransformPoly(9, 1, value2pts(scaleDistance->value(),doc->unitIndex()));
 }
 
 void NodePalette::ShearR()




More information about the scribus-commit mailing list