Skip to content
Permalink
Browse files

Fixed restarting measurement with right-clicking.

  • Loading branch information
homann committed Sep 18, 2012
1 parent 3032f71 commit 5eb1e2d2670a4826001cd44624de67aa85fa321e
Showing with 6 additions and 7 deletions.
  1. +0 −2 src/app/qgsmeasuredialog.cpp
  2. +6 −5 src/app/qgsmeasuretool.cpp
@@ -98,7 +98,6 @@ void QgsMeasureDialog::restart()

void QgsMeasureDialog::mousePress( QgsPoint &point )
{

show();
raise();
if ( ! mTool->done() )
@@ -144,7 +143,6 @@ void QgsMeasureDialog::addPoint( QgsPoint &p )
{
Q_UNUSED( p );

QgsDebugMsg( "Entering" );
int numPoints = mTool->points().size();
if ( mMeasureArea && numPoints > 2 )
{
@@ -40,7 +40,7 @@ QgsMeasureTool::QgsMeasureTool( QgsMapCanvas* canvas, bool measureArea )
QPixmap myCrossHairQPixmap = QPixmap(( const char ** ) cross_hair_cursor );
mCursor = QCursor( myCrossHairQPixmap, 8, 8 );

mDone = false;
mDone = true;
// Append point we will move
mPoints.append( QgsPoint( 0, 0 ) );

@@ -103,14 +103,14 @@ void QgsMeasureTool::restart()
{
mPoints.clear();
// Append point we will move
mPoints.append( QgsPoint( 0, 0 ) );
// mPoints.append( QgsPoint( 0, 0 ) );

mRubberBand->reset( mMeasureArea );

// re-read settings
updateSettings();

mDone = false;
mDone = true;
mWrongProjectProjection = false;

}
@@ -135,9 +135,10 @@ void QgsMeasureTool::canvasPressEvent( QMouseEvent * e )
if ( mDone )
{
mDialog->restart();
QgsPoint point = snapPoint( e->pos() );
addPoint( point );
mDone = false;
}
QgsPoint idPoint = snapPoint( e->pos() );
// mDialog->mousePress( idPoint );
}
}

0 comments on commit 5eb1e2d

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