Skip to content

Commit 8eb037c

Browse files
author
wonder
committedNov 7, 2007
Fix for ticket #550.
Another case where G_fatal_error has been terminating QGIS. Also implemented suggestions in the ticket: - only left-click will add new point/centroid - no tool will be activated when grass edit is opened git-svn-id: http://svn.osgeo.org/qgis/trunk@7343 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 65ee92c commit 8eb037c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
 

‎src/plugins/grass/qgsgrassedit.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,6 @@ void QgsGrassEdit::init()
537537

538538
// TODO: how to get keyboard events from canvas (shortcuts)
539539

540-
newPoint();
541-
542540
restorePosition();
543541

544542
mValid = true;
@@ -1600,6 +1598,10 @@ void QgsGrassEdit::displayElement ( int line, const QPen & pen, int size, QPaint
16001598
#ifdef QGISDEBUG
16011599
std::cerr << "QgsGrassEdit::displayElement() line = " << line << std::endl;
16021600
#endif
1601+
1602+
// is it a valid line?
1603+
if (line == 0)
1604+
return;
16031605

16041606
if ( !mSymbDisplay[mLineSymb[line]] ) return;
16051607

‎src/plugins/grass/qgsgrassedittools.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ QgsGrassEditNewPoint::QgsGrassEditNewPoint(QgsGrassEdit* edit, bool newCentroid)
7878

7979
void QgsGrassEditNewPoint::mouseClick(QgsPoint & point, Qt::ButtonState button)
8080
{
81+
if ( button != Qt::LeftButton)
82+
return;
83+
8184
Vect_reset_line ( e->mEditPoints );
8285
e->snap ( point );
8386
Vect_append_point ( e->mEditPoints, point.x(), point.y(), 0.0 );

0 commit comments

Comments
 (0)
Please sign in to comment.