r15000 by jghali - #9034: mouse pointer shape bugs after moving over guide

scribus-commit scribus-commit at lists.scribus.net
Thu Apr 22 22:00:37 CEST 2010


Revision: 15000
Author: jghali
Date: 2010-04-22T19:56:37.694700Z
Commit message: #9034: mouse pointer shape bugs after moving over guide

Changeset: 
M  /trunk/Scribus/scribus/canvasmode_normal.cpp

Diffs:
Index: scribus/canvasmode_normal.cpp
===================================================================
--- scribus/canvasmode_normal.cpp	(revision 14999)
+++ scribus/canvasmode_normal.cpp	(revision 15000)
@@ -257,22 +257,23 @@
 	if (commonMouseMove(m))
 		return;
 	m_mouseCurrentPoint = mousePointDoc;
-	if ((m_doc->guidesPrefs().guidesShown) && (!m_doc->GuideLock) && (m_doc->OnPage(mousePointDoc.x(), mousePointDoc.y()) != -1) )
+	bool movingOrResizing = (m_canvas->m_viewMode.operItemMoving || m_canvas->m_viewMode.operItemResizing);
+	if ((m_doc->guidesPrefs().guidesShown) && (!m_doc->GuideLock) && (!movingOrResizing) && (m_doc->OnPage(mousePointDoc.x(), mousePointDoc.y()) != -1) )
 	{
-		// #9002: Resize points undraggable when object is aligned to a guide
-		// Allow item resize when guides are aligned to item while preserving
-		// ability to drag guide when guis is in foreground and inside selection
-		bool enableGuideGesture(false);
-		Canvas::FrameHandle frameResizeHandle(Canvas::OUTSIDE);
-		if (m_doc->m_Selection->count() > 0)
-		{
-			double gx(0.0), gy(0.0), gw(0.0), gh(0.0);
-			m_doc->m_Selection->setGroupRect();
-			m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
-			frameResizeHandle = m_canvas->frameHitTest(QPointF(mousePointDoc.x(),mousePointDoc.y()), QRectF(gx, gy, gw, gh));
-		}
-		enableGuideGesture |= (frameResizeHandle == Canvas::OUTSIDE);
-		enableGuideGesture |= ((!m_doc->guidesPrefs().guidePlacement) && (frameResizeHandle == Canvas::INSIDE));
+		// #9002: Resize points undraggable when object is aligned to a guide
+		// Allow item resize when guides are aligned to item while preserving
+		// ability to drag guide when guis is in foreground and inside selection
+		bool enableGuideGesture(false);
+		Canvas::FrameHandle frameResizeHandle(Canvas::OUTSIDE);
+		if (m_doc->m_Selection->count() > 0)
+		{
+			double gx(0.0), gy(0.0), gw(0.0), gh(0.0);
+			m_doc->m_Selection->setGroupRect();
+			m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
+			frameResizeHandle = m_canvas->frameHitTest(QPointF(mousePointDoc.x(),mousePointDoc.y()), QRectF(gx, gy, gw, gh));
+		}
+		enableGuideGesture |= (frameResizeHandle == Canvas::OUTSIDE);
+		enableGuideGesture |= ((!m_doc->guidesPrefs().guidePlacement) && (frameResizeHandle == Canvas::INSIDE));
 		if (enableGuideGesture)
 		{
 			if (!guideMoveGesture)
@@ -1054,17 +1055,17 @@
 	{
 		if ((m_doc->guidesPrefs().guidesShown) && (m_doc->OnPage(MxpS, MypS) != -1))
 		{
-			// #9002: Resize points undraggable when object is aligned to a guide
-			// Allow item resize when guides are aligned to item while preserving
+			// #9002: Resize points undraggable when object is aligned to a guide
+			// Allow item resize when guides are aligned to item while preserving
 			// ability to drag guide when guis is in foreground and inside selection
-			bool enableGuideGesture(true);
-			if (m_doc->m_Selection->count() > 0)
-			{
-				double gx(0.0), gy(0.0), gw(0.0), gh(0.0);
-				m_doc->m_Selection->setGroupRect();
-				m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
-				Canvas::FrameHandle frameResizeHandle = m_canvas->frameHitTest(QPointF(mousePointDoc.x(),mousePointDoc.y()), QRectF(gx, gy, gw, gh));
-				enableGuideGesture = (frameResizeHandle == Canvas::INSIDE);
+			bool enableGuideGesture(true);
+			if (m_doc->m_Selection->count() > 0)
+			{
+				double gx(0.0), gy(0.0), gw(0.0), gh(0.0);
+				m_doc->m_Selection->setGroupRect();
+				m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
+				Canvas::FrameHandle frameResizeHandle = m_canvas->frameHitTest(QPointF(mousePointDoc.x(),mousePointDoc.y()), QRectF(gx, gy, gw, gh));
+				enableGuideGesture = (frameResizeHandle == Canvas::INSIDE);
 			}
 			if (enableGuideGesture)
 			{




More information about the scribus-commit mailing list