Skip to content
Permalink
Browse files

fix typo and missing disconnect

  • Loading branch information
3nids committed Jan 18, 2018
1 parent 4733bc8 commit a09cb6f36481bda3caddcd87316d2b674aff2a1d
Showing with 4 additions and 3 deletions.
  1. +3 −2 src/app/qgsmaptoolselectradius.cpp
  2. +1 −1 src/app/qgsmaptoolselectradius.h
@@ -83,7 +83,7 @@ bool QgsDistanceWidget::eventFilter( QObject *obj, QEvent *ev )
QKeyEvent *event = static_cast<QKeyEvent *>( ev );
if ( event->key() == Qt::Key_Escape )
{
emit distanceEditingCancelled();
emit distanceEditingCanceled();
return true;
}
if ( event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return )
@@ -258,7 +258,7 @@ void QgsMapToolSelectRadius::createRotationWidget()

connect( mDistanceWidget, &QgsDistanceWidget::distanceChanged, this, &QgsMapToolSelectRadius::updateRubberband );
connect( mDistanceWidget, &QgsDistanceWidget::distanceEditingFinished, this, &QgsMapToolSelectRadius::radiusValueEntered );
connect( mDistanceWidget, &QgsDistanceWidget::distanceEditingCancelled, this, &QgsMapToolSelectRadius::cancel );
connect( mDistanceWidget, &QgsDistanceWidget::distanceEditingCanceled, this, &QgsMapToolSelectRadius::cancel );
}

void QgsMapToolSelectRadius::deleteRotationWidget()
@@ -267,6 +267,7 @@ void QgsMapToolSelectRadius::deleteRotationWidget()
{
disconnect( mDistanceWidget, &QgsDistanceWidget::distanceChanged, this, &QgsMapToolSelectRadius::updateRubberband );
disconnect( mDistanceWidget, &QgsDistanceWidget::distanceEditingFinished, this, &QgsMapToolSelectRadius::radiusValueEntered );
disconnect( mDistanceWidget, &QgsDistanceWidget::distanceEditingCanceled, this, &QgsMapToolSelectRadius::cancel );
mDistanceWidget->releaseKeyboard();
mDistanceWidget->deleteLater();
}
@@ -44,7 +44,7 @@ class APP_EXPORT QgsDistanceWidget : public QWidget
signals:
void distanceChanged( double distance );
void distanceEditingFinished( double distance, const Qt::KeyboardModifiers &modifiers );
void distanceEditingCancelled();
void distanceEditingCanceled();

protected:
bool eventFilter( QObject *obj, QEvent *ev ) override;

0 comments on commit a09cb6f

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