Skip to content

Commit 6278c92

Browse files
author
wonder
committed
added QPoint QgsMapCanvas::mouseLastXY()
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5183 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent a9e8d9e commit 6278c92

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/gui/qgsmapcanvas.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,4 +1074,7 @@ void QgsMapCanvas::showError(QgsMapLayer * mapLayer)
10741074

10751075
}
10761076

1077-
// ENDS
1077+
QPoint QgsMapCanvas::mouseLastXY()
1078+
{
1079+
return mCanvasProperties->mouseLastXY;
1080+
}

src/gui/qgsmapcanvas.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@ class QgsMapCanvas : public Q3CanvasView
191191
void panActionEnd(QPoint releasePoint);
192192
//! Called when mouse is moving and pan is activated
193193
void panAction(QMouseEvent * event);
194+
195+
//! returns last position of mouse cursor
196+
QPoint mouseLastXY();
194197

195198
public slots:
196199

0 commit comments

Comments
 (0)