Hide temporary rubberband when maptool is not active.

This commit is contained in:
Sebastian Dietrich 2015-12-16 20:01:19 +01:00
parent a66a8eae59
commit e8ef77e781
3 changed files with 17 additions and 0 deletions

View File

@ -25,6 +25,9 @@ class QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
//! destructor
virtual ~QgsMapToolCapture();
//! active the tool
virtual void activate();
//! deactive the tool
virtual void deactivate();

View File

@ -75,8 +75,19 @@ QgsMapToolCapture::~QgsMapToolCapture()
}
}
void QgsMapToolCapture::activate()
{
if ( mTempRubberBand )
mTempRubberBand->show();
QgsMapToolAdvancedDigitizing::activate();
}
void QgsMapToolCapture::deactivate()
{
if ( mTempRubberBand )
mTempRubberBand->hide();
delete mSnappingMarker;
mSnappingMarker = nullptr;

View File

@ -42,6 +42,9 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
//! destructor
virtual ~QgsMapToolCapture();
//! active the tool
virtual void activate() override;
//! deactive the tool
virtual void deactivate() override;