r23408 by jghali - #15994: If guides are behind items, cursor still changes to guide moving

scribus-commit scribus-commit at lists.scribus.net
Tue Dec 10 02:38:40 UTC 2019


Author: jghali
Date: Tue Dec 10 02:38:40 2019
New Revision: 23408

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23408
Log:
#15994: If guides are behind items, cursor still changes to guide moving

Modified:
    trunk/Scribus/scribus/canvasmode_normal.cpp

Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23408&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp	Tue Dec 10 02:38:40 2019
@@ -322,7 +322,14 @@
 			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));
+			frameResizeHandle = m_canvas->frameHitTest(QPointF(mousePointDoc.x(), mousePointDoc.y()), QRectF(gx, gy, gw, gh));
+		}
+		else
+		{
+			PageItem* hoveredItem = nullptr;
+			hoveredItem = m_canvas->itemUnderCursor(m->globalPos(), hoveredItem, m->modifiers());
+			if (hoveredItem)
+				frameResizeHandle = m_canvas->frameHitTest(QPointF(mousePointDoc.x(), mousePointDoc.y()), hoveredItem);
 		}
 		enableGuideGesture |= (frameResizeHandle == Canvas::OUTSIDE);
 		enableGuideGesture |= ((m_doc->guidesPrefs().renderStackOrder.indexOf(3) > m_doc->guidesPrefs().renderStackOrder.indexOf(4)) && (frameResizeHandle == Canvas::INSIDE));




More information about the scribus-commit mailing list