Skip to content

Commit 390b145

Browse files
author
timlinux
committed
use a better cursor
git-svn-id: http://svn.osgeo.org/qgis/trunk@9000 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 65c5bf4 commit 390b145

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

src/plugins/coordinate_capture/coordinate_capture.svg

+4-1
Loading

src/plugins/coordinate_capture/coordinatecapturemaptool.cpp

+9-5
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ CoordinateCaptureMapTool::CoordinateCaptureMapTool(QgsMapCanvas* thepCanvas)
3131
: QgsMapTool(thepCanvas)
3232
{
3333
// set cursor
34-
QPixmap myIdentifyCursor = QPixmap((const char **) identify_cursor);
34+
QPixmap myIdentifyCursor = QPixmap((const char **) capture_point_cursor);
3535
mCursor = QCursor(myIdentifyCursor, 1, 1);
3636
mpMapCanvas = thepCanvas;
3737
mpRubberBand = new QgsRubberBand(mpMapCanvas,false); //false - not a polygon
38+
mpRubberBand->setColor(Qt::red);
39+
mpRubberBand->setWidth(3);
3840
}
3941

4042
CoordinateCaptureMapTool::~CoordinateCaptureMapTool()
@@ -58,13 +60,15 @@ void CoordinateCaptureMapTool::canvasReleaseEvent(QMouseEvent * thepEvent)
5860
return;
5961
}
6062

61-
mpRubberBand->reset(false);
62-
63-
// convert screen coordinates to map coordinates
6463
QgsPoint myPoint =
6564
mCanvas->getCoordinateTransform()->toMapCoordinates(thepEvent->x(), thepEvent->y());
66-
mpRubberBand->addPoint(myPoint,true); //true - update canvas
6765
emit pointCaptured(myPoint);
66+
mpRubberBand->reset(false);
67+
// convert screen coordinates to map coordinates
68+
mpRubberBand->addPoint(myPoint,false); //true - update canvas
69+
mpRubberBand->addPoint(myPoint,false); //true - update canvas
70+
mpRubberBand->addPoint(myPoint,false); //true - update canvas
71+
mpRubberBand->show();
6872
}
6973

7074

0 commit comments

Comments
 (0)