Skip to content
Permalink
Browse files

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/qgis@7343 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Nov 7, 2007
1 parent 0755822 commit b6ecfb86a8d2b935cb53e4965dcccacd6f1e0489
Showing with 7 additions and 2 deletions.
  1. +4 −2 src/plugins/grass/qgsgrassedit.cpp
  2. +3 −0 src/plugins/grass/qgsgrassedittools.cpp
@@ -537,8 +537,6 @@ void QgsGrassEdit::init()

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

newPoint();

restorePosition();

mValid = true;
@@ -1600,6 +1598,10 @@ void QgsGrassEdit::displayElement ( int line, const QPen & pen, int size, QPaint
#ifdef QGISDEBUG
std::cerr << "QgsGrassEdit::displayElement() line = " << line << std::endl;
#endif

// is it a valid line?
if (line == 0)
return;

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

@@ -78,6 +78,9 @@ QgsGrassEditNewPoint::QgsGrassEditNewPoint(QgsGrassEdit* edit, bool newCentroid)

void QgsGrassEditNewPoint::mouseClick(QgsPoint & point, Qt::ButtonState button)
{
if ( button != Qt::LeftButton)
return;

Vect_reset_line ( e->mEditPoints );
e->snap ( point );
Vect_append_point ( e->mEditPoints, point.x(), point.y(), 0.0 );

0 comments on commit b6ecfb8

Please sign in to comment.
You can’t perform that action at this time.