File tree Expand file tree Collapse file tree 2 files changed +0
-34
lines changed Expand file tree Collapse file tree 2 files changed +0
-34
lines changed Original file line number Diff line number Diff line change 41
41
QgsMapToolCapture::QgsMapToolCapture ( QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget, CaptureMode mode )
42
42
: QgsMapToolAdvancedDigitizing( canvas, cadDockWidget )
43
43
, mCaptureMode( mode )
44
- #ifdef Q_OS_WIN
45
- , mSkipNextContextMenuEvent ( 0 )
46
- #endif
47
44
{
48
45
mCaptureModeFromLayer = mode == CaptureNone;
49
46
mCapturing = false ;
@@ -640,18 +637,6 @@ void QgsMapToolCapture::stopCapturing()
640
637
641
638
mTracingStartPoint = QgsPointXY ();
642
639
643
- #ifdef Q_OS_WIN
644
- Q_FOREACH ( QWidget *w, qApp->topLevelWidgets () )
645
- {
646
- if ( w->objectName () == " QgisApp" )
647
- {
648
- if ( mSkipNextContextMenuEvent ++ == 0 )
649
- w->installEventFilter ( this );
650
- break ;
651
- }
652
- }
653
- #endif
654
-
655
640
mCapturing = false ;
656
641
mCaptureCurve .clear ();
657
642
mSnappingMatches .clear ();
@@ -783,15 +768,3 @@ void QgsMapToolCapture::setPoints( const QVector<QgsPointXY> &pointList )
783
768
mSnappingMatches .append ( QgsPointLocator::Match () );
784
769
}
785
770
786
- #ifdef Q_OS_WIN
787
- bool QgsMapToolCapture::eventFilter ( QObject *obj, QEvent *event )
788
- {
789
- if ( event->type () != QEvent::ContextMenu )
790
- return false ;
791
-
792
- if ( --mSkipNextContextMenuEvent == 0 )
793
- obj->removeEventFilter ( this );
794
-
795
- return mSkipNextContextMenuEvent >= 0 ;
796
- }
797
- #endif
Original file line number Diff line number Diff line change @@ -97,10 +97,6 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
97
97
*/
98
98
void keyPressEvent ( QKeyEvent *e ) override ;
99
99
100
- #ifdef Q_OS_WIN
101
- virtual bool eventFilter ( QObject *obj, QEvent *e ) override ;
102
- #endif
103
-
104
100
/* *
105
101
* Clean a temporary rubberband
106
102
*/
@@ -261,9 +257,6 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
261
257
262
258
friend class TestQgsMapToolReshape ;
263
259
264
- #ifdef Q_OS_WIN
265
- int mSkipNextContextMenuEvent ;
266
- #endif
267
260
};
268
261
269
262
#endif
You can’t perform that action at this time.
0 commit comments