Skip to content

Commit

Permalink
Merge pull request #2584 from SebDieBln/MapCanvas_EnterLeave
Browse files Browse the repository at this point in the history
UI improvement for digitizing maptools
  • Loading branch information
3nids committed Dec 23, 2015
2 parents b602c5c + e8ef77e commit b0bbfc7
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 b0bbfc7

Please sign in to comment.