Skip to content

Commit 5d68018

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

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/gui/qgsmapcanvas.cpp

+4-1
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

+3
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)