Navigation Menu

Skip to content

Commit

Permalink
Hide temporary rubberband when maptool is not active.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebDieBln committed Dec 16, 2015
1 parent a66a8ea commit e8ef77e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/gui/qgsmaptoolcapture.sip
Expand Up @@ -25,6 +25,9 @@ class QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
//! destructor
virtual ~QgsMapToolCapture();

//! active the tool
virtual void activate();

//! deactive the tool
virtual void deactivate();

Expand Down
11 changes: 11 additions & 0 deletions src/gui/qgsmaptoolcapture.cpp
Expand Up @@ -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;

Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgsmaptoolcapture.h
Expand Up @@ -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;

Expand Down

0 comments on commit e8ef77e

Please sign in to comment.