Skip to content

Commit f67a08a

Browse files
committedMay 27, 2015
Hide measurement rubberband on dialog close
Fix #12834
1 parent c246fd8 commit f67a08a

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed
 

‎src/app/qgsmeasuredialog.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ QgsMeasureDialog::QgsMeasureDialog( QgsMeasureTool* tool, Qt::WindowFlags f )
5555
updateSettings();
5656

5757
connect( mUnitsCombo, SIGNAL( currentIndexChanged( const QString & ) ), this, SLOT( unitsChanged( const QString & ) ) );
58+
connect( buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
5859

5960
groupBox->setCollapsed( true );
6061
}
@@ -204,12 +205,6 @@ void QgsMeasureDialog::removeLastPoint()
204205
}
205206
}
206207

207-
void QgsMeasureDialog::on_buttonBox_rejected( void )
208-
{
209-
restart();
210-
QDialog::close();
211-
}
212-
213208
void QgsMeasureDialog::closeEvent( QCloseEvent *e )
214209
{
215210
saveWindowLocation();
@@ -350,3 +345,10 @@ void QgsMeasureDialog::convertMeasurement( double &measure, QGis::UnitType &u, b
350345
mDa.convertMeasurement( measure, myUnits, mDisplayUnits, isArea );
351346
u = myUnits;
352347
}
348+
349+
350+
void QgsMeasureDialog::reject()
351+
{
352+
restart();
353+
QDialog::close();
354+
}

‎src/app/qgsmeasuredialog.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ class APP_EXPORT QgsMeasureDialog : public QDialog, private Ui::QgsMeasureBase
5151
void removeLastPoint();
5252

5353
public slots:
54-
//! Reject
55-
void on_buttonBox_rejected( void );
54+
virtual void reject() override;
5655

5756
//! Reset and start new
5857
void restart();

0 commit comments

Comments
 (0)
Failed to load comments.