Skip to content

Commit b0bbfc7

Browse files
committed
Merge pull request #2584 from SebDieBln/MapCanvas_EnterLeave
UI improvement for digitizing maptools
2 parents b602c5c + e8ef77e commit b0bbfc7

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

python/gui/qgsmaptoolcapture.sip

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ class QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
2525
//! destructor
2626
virtual ~QgsMapToolCapture();
2727

28+
//! active the tool
29+
virtual void activate();
30+
2831
//! deactive the tool
2932
virtual void deactivate();
3033

src/gui/qgsmaptoolcapture.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,19 @@ QgsMapToolCapture::~QgsMapToolCapture()
7575
}
7676
}
7777

78+
void QgsMapToolCapture::activate()
79+
{
80+
if ( mTempRubberBand )
81+
mTempRubberBand->show();
82+
83+
QgsMapToolAdvancedDigitizing::activate();
84+
}
85+
7886
void QgsMapToolCapture::deactivate()
7987
{
88+
if ( mTempRubberBand )
89+
mTempRubberBand->hide();
90+
8091
delete mSnappingMarker;
8192
mSnappingMarker = nullptr;
8293

src/gui/qgsmaptoolcapture.h

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
4242
//! destructor
4343
virtual ~QgsMapToolCapture();
4444

45+
//! active the tool
46+
virtual void activate() override;
47+
4548
//! deactive the tool
4649
virtual void deactivate() override;
4750

0 commit comments

Comments
 (0)