Skip to content

Commit 64bb3ef

Browse files
committed
Add Qgs3DMapTool::cursor()
1 parent c5d8843 commit 64bb3ef

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

src/app/3d/qgs3dmapcanvas.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ void Qgs3DMapCanvas::setMapTool( Qgs3DMapTool *tool )
125125
{
126126
mEngine->window()->installEventFilter( this );
127127
mScene->cameraController()->setEnabled( false );
128-
mEngine->window()->setCursor( Qt::CrossCursor );
128+
mEngine->window()->setCursor( tool->cursor() );
129129
}
130130

131131
if ( mMapTool )

src/app/3d/qgs3dmaptool.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,8 @@ void Qgs3DMapTool::activate()
4545
void Qgs3DMapTool::deactivate()
4646
{
4747
}
48+
49+
QCursor Qgs3DMapTool::cursor() const
50+
{
51+
return Qt::CrossCursor;
52+
}

src/app/3d/qgs3dmaptool.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ class Qgs3DMapTool : public QObject
4141
//! Called when map tool is being deactivated
4242
virtual void deactivate();
4343

44+
//! Mouse cursor to be used when the tool is active
45+
virtual QCursor cursor() const;
46+
4447
protected:
4548
Qgs3DMapCanvas *mCanvas = nullptr;
4649
};

src/app/3d/qgs3dmaptoolidentify.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ namespace Qt3DRender
2323
class QPickEvent;
2424
}
2525

26-
//class QgsMapToolIdentifyAction;
27-
2826

2927
class Qgs3DMapToolIdentify : public Qgs3DMapTool
3028
{
@@ -45,7 +43,7 @@ class Qgs3DMapToolIdentify : public Qgs3DMapTool
4543
void onTerrainEntityChanged();
4644

4745
private:
48-
//QgsMapToolIdentifyAction *mIdentifyTool2D = nullptr;
46+
4947
};
5048

5149
#endif // QGS3DMAPTOOLIDENTIFY_H

0 commit comments

Comments
 (0)