This is a very small patch. It changes the mouse cursors that are
displayed in Move interaction mode. Normally it displays the opened hand
cursor. While the mouse button is pressed and you are moving something
around, the closed hand cursor is used. This is just like in Adobe
Reader when drag-scrolling the page. It's a Qt feature, so no new
resources are added.

-- 
Yves Goergen "LonelyPixel" <[email protected]>
Visit my web laboratory at http://beta.unclassified.de
--- merkaartor\Interaction\MoveTrackPointInteraction.cpp.orig   Fri Jan 02 
23:21:05 2009
+++ merkaartor\Interaction\MoveTrackPointInteraction.cpp        Sun Jan 04 
17:07:54 2009
@@ -27,8 +27,7 @@
 
 QCursor MoveTrackPointInteraction::cursor() const
 {
-       QPixmap pm(":/Icons/move.xpm");
-       return QCursor(pm);
+       return QCursor(Qt::OpenHandCursor);
 }
 
 
@@ -59,6 +58,10 @@
                OriginalPosition.push_back(Moving[i]->position());
                addToNoSnap(Moving[i]);
        }
+
+       // Change mouse cursor if moving something
+       if (Moving.size())
+               view()->setCursor(QCursor(Qt::ClosedHandCursor));
 }
 
 void MoveTrackPointInteraction::snapMouseReleaseEvent(QMouseEvent * event, 
MapFeature* Closer)
@@ -81,6 +84,9 @@
        Moving.clear();
        OriginalPosition.clear();
        clearNoSnap();
+
+       // Revert to default interaction cursor
+       view()->setCursor(cursor());
 }
 
 void MoveTrackPointInteraction::snapMouseMoveEvent(QMouseEvent* event, 
MapFeature* Closer)
_______________________________________________
Merkaartor mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/merkaartor

Reply via email to