Make cursor change when hovering over handle.
This commit is contained in:
@@ -924,6 +924,8 @@ namespace glabels
|
|||||||
/// Is one of this object's handles locate at x,y? If so, return it.
|
/// Is one of this object's handles locate at x,y? If so, return it.
|
||||||
///
|
///
|
||||||
Handle* LabelModelObject::handleAt( double scale, double x, double y ) const
|
Handle* LabelModelObject::handleAt( double scale, double x, double y ) const
|
||||||
|
{
|
||||||
|
if ( mSelectedFlag )
|
||||||
{
|
{
|
||||||
QPointF p( x, y );
|
QPointF p( x, y );
|
||||||
p -= QPointF( mX0, mY0 ); // Translate point to x0,y0
|
p -= QPointF( mX0, mY0 ); // Translate point to x0,y0
|
||||||
@@ -936,6 +938,7 @@ namespace glabels
|
|||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-2
@@ -345,8 +345,12 @@ glabels::View::mouseMoveEvent( QMouseEvent* event )
|
|||||||
{
|
{
|
||||||
|
|
||||||
case IdleState:
|
case IdleState:
|
||||||
/* @TODO handle handles. */
|
if ( mModel->isSelectionAtomic() &&
|
||||||
if ( mModel->objectAt( mZoom, xWorld, yWorld ) )
|
mModel->handleAt( mZoom, xWorld, yWorld ) )
|
||||||
|
{
|
||||||
|
setCursor( Qt::CrossCursor );
|
||||||
|
}
|
||||||
|
else if ( mModel->objectAt( mZoom, xWorld, yWorld ) )
|
||||||
{
|
{
|
||||||
setCursor( Qt::SizeAllCursor );
|
setCursor( Qt::SizeAllCursor );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user