Skip to content

Commit 01dcc25

Browse files
author
rblazek
committed
redraw last segment when zoom stopped
git-svn-id: http://svn.osgeo.org/qgis/trunk@5186 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 65a41b7 commit 01dcc25

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/plugins/grass/qgsgrassedittools.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* *
1515
***************************************************************************/
1616

17+
#include "qgsmapcanvas.h"
1718
#include "qgsgrassedittools.h"
1819
#include "qgsgrassedit.h"
1920
#include "qgsgrassattributes.h"
@@ -129,8 +130,8 @@ void QgsGrassEditNewLine::activate()
129130
if ( e->mEditPoints->n_points > 0 ) {
130131
Vect_reset_line ( e->mPoints );
131132
Vect_append_points ( e->mPoints, e->mEditPoints, GV_FORWARD );
132-
// TODO: how to get mouse position?
133-
//Vect_append_point ( e->mPoints, newPoint.x(), newPoint.y(), 0.0 );
133+
QgsPoint point = toMapCoords( e->mCanvas->mouseLastXY() );
134+
Vect_append_point ( e->mPoints, point.x(), point.y(), 0.0 );
134135
e->displayDynamic ( e->mPoints );
135136
}
136137

0 commit comments

Comments
 (0)