r13922 by fschmid - Fixed Bug #7900: "display number of degrees during rotation of object"

scribus-commit scribus-commit at lists.scribus.net
Wed Aug 26 17:15:18 CEST 2009


Revision: 13922
Author: fschmid
Date: 2009-08-26T15:15:56.869011Z
Commit message: Fixed Bug #7900: "display number of degrees during rotation of object"

Changeset: 
M  /branches/Version135/Scribus/scribus/canvas.cpp
M  /branches/Version135/Scribus/scribus/canvasmode_rotate.cpp
M  /branches/Version135/Scribus/scribus/canvas.h

Diffs:
Index: scribus/canvas.h
===================================================================
--- scribus/canvas.h	(revision 13921)
+++ scribus/canvas.h	(revision 13922)
@@ -191,6 +191,7 @@
 	void displayCorrectedSingleHUD(QPoint m, double val, bool isX);
 	void displayXYHUD(QPoint m, double x, double y);
 	void displaySizeHUD(QPoint m, double x, double y, bool isLine = false);
+	void displayRotHUD(QPoint m, double rot);
 	
 	void setupEditHRuler(PageItem * item, bool forceAndReset = false);
 	
Index: scribus/canvasmode_rotate.cpp
===================================================================
--- scribus/canvasmode_rotate.cpp	(revision 13921)
+++ scribus/canvasmode_rotate.cpp	(revision 13922)
@@ -400,6 +400,10 @@
 		if (m_view->moveTimerElapsed() && m_canvas->m_viewMode.m_MouseButtonPressed)
 		{
 			m_canvas->repaint();
+			double itemRotation;
+			FPoint itemPos;
+			getNewItemPosition(currItem, itemPos, itemRotation);
+			m_canvas->displayRotHUD(m->globalPos(), itemRotation);
 		}
 		if (!m_canvas->m_viewMode.m_MouseButtonPressed)
 		{
Index: scribus/canvas.cpp
===================================================================
--- scribus/canvas.cpp	(revision 13921)
+++ scribus/canvas.cpp	(revision 13922)
@@ -2259,6 +2259,16 @@
 		QToolTip::showText(m + QPoint(5, 5), tr("Width: %1\nHeight: %2").arg(value2String(x, m_doc->unitIndex(), true, true)).arg(value2String(y, m_doc->unitIndex(), true, true)), this);
 }
 
+void Canvas::displayRotHUD(QPoint m, double rot)
+{
+	double r;
+	if (rot < 0.0)
+		r = rot * -1.0;
+	else
+		r = 360.0 - rot;
+	QToolTip::showText(m + QPoint(5, 5), tr("Angle: %1").arg(value2String(r, SC_DEGREES, true, true)), this);
+}
+
 void Canvas::setupEditHRuler(PageItem * item, bool forceAndReset)
 {
 	static QString rulerItemRef;




More information about the scribus-commit mailing list