r13923 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:20:16 CEST 2009
Revision: 13923
Author: fschmid
Date: 2009-08-26T15:16:49.440901Z
Commit message: Fixed Bug #7900: "display number of degrees during rotation of object"
Changeset:
M /trunk/Scribus/scribus/canvas.cpp
M /trunk/Scribus/scribus/canvasmode_rotate.cpp
M /trunk/Scribus/scribus/canvas.h
Diffs:
Index: scribus/canvas.h
===================================================================
--- scribus/canvas.h (revision 13922)
+++ scribus/canvas.h (revision 13923)
@@ -192,6 +192,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/canvas.cpp
===================================================================
--- scribus/canvas.cpp (revision 13922)
+++ scribus/canvas.cpp (revision 13923)
@@ -2251,6 +2251,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;
Index: scribus/canvasmode_rotate.cpp
===================================================================
--- scribus/canvasmode_rotate.cpp (revision 13922)
+++ scribus/canvasmode_rotate.cpp (revision 13923)
@@ -402,6 +402,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)
{
@@ -460,7 +464,6 @@
if (!m_view->redrawMarker->isVisible())
m_view->redrawMarker->show();
m_view->HaveSelRect = true;
- return;
}
}
}
More information about the scribus-commit
mailing list