Make cursor change when hovering over handle.

This commit is contained in:
Jim Evins
2015-08-14 16:49:09 -04:00
parent ffa0819010
commit ef1cadad0c
2 changed files with 16 additions and 9 deletions
+10 -7
View File
@@ -925,15 +925,18 @@ namespace glabels
///
Handle* LabelModelObject::handleAt( double scale, double x, double y ) const
{
QPointF p( x, y );
p -= QPointF( mX0, mY0 ); // Translate point to x0,y0
foreach ( Handle* handle, mHandles )
if ( mSelectedFlag )
{
QPainterPath handlePath = mMatrix.map( handle->path( scale ) );
if ( handlePath.contains( p ) )
QPointF p( x, y );
p -= QPointF( mX0, mY0 ); // Translate point to x0,y0
foreach ( Handle* handle, mHandles )
{
return handle;
QPainterPath handlePath = mMatrix.map( handle->path( scale ) );
if ( handlePath.contains( p ) )
{
return handle;
}
}
}