r15166 by jghali - #9140 : placement of guidelines on the page border causes mouse cursor to remain showing the "move guide" symbol

scribus-commit scribus-commit at lists.scribus.net
Sun Jun 6 23:40:20 CEST 2010


Revision: 15166
Author: jghali
Date: 2010-06-06T21:39:33.646408Z
Commit message: #9140 : placement of guidelines on the page border causes mouse cursor to remain showing the "move guide" symbol

Changeset: 
M  /branches/Version135/Scribus/scribus/canvasmode_normal.cpp

Diffs:
Index: scribus/canvasmode_normal.cpp
===================================================================
--- scribus/canvasmode_normal.cpp	(revision 15165)
+++ scribus/canvasmode_normal.cpp	(revision 15166)
@@ -256,7 +256,8 @@
 		return;
 	m_mouseCurrentPoint = mousePointDoc;
 	bool movingOrResizing = (m_canvas->m_viewMode.operItemMoving || m_canvas->m_viewMode.operItemResizing);
-	if ((m_doc->guidesSettings.guidesShown) && (!m_doc->GuideLock) && (!movingOrResizing) && (m_doc->OnPage(mousePointDoc.x(), mousePointDoc.y()) != -1) )
+	bool mouseIsOnPage    = (m_doc->OnPage(mousePointDoc.x(), mousePointDoc.y()) != -1);
+	if ((m_doc->guidesSettings.guidesShown) && (!m_doc->GuideLock) && (!movingOrResizing) && (mouseIsOnPage) )
 	{
 		// #9002: Resize points undraggable when object is aligned to a guide
 		// Allow item resize when guides are aligned to item while preserving
@@ -300,6 +301,14 @@
 			qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 		}
 	}
+	else if (!mouseIsOnPage)
+	{
+		QCursor* cursor = qApp->overrideCursor();
+		if (cursor && ((cursor->shape() == Qt::SplitHCursor) || (cursor->shape() == Qt::SplitVCursor)))
+		{
+			qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
+		}
+	}
 	if ((GetItem(&currItem)) && (!shiftSelItems))
 	{
 		newX = qRound(mousePointDoc.x()); //m_view->translateToDoc(m->x(), m->y()).x());




More information about the scribus-commit mailing list