Bug report #12963

QgsMapToolIdentifyFeature default cursor hotspot is incorrect

Added by Uros Bernik over 7 years ago. Updated over 3 years ago.

Category:Map Tools
Affected QGIS version:2.8.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:21042


When implementing a custom QgsMapToolIdentifyFeature tool, i came across this. You set the active tool (which subclasses QgsMapToolIdentifyFeature) on the map canvas, and the cursor changes into a targeting cross. But the "hot spot" of the cross is not in the cross, but rather upper left corner of the cross.


#1 Updated by Jürgen Fischer over 7 years ago

  • Subject changed from QgsMapToolIdenfityFeature default cursor hotspot is incorrect to QgsMapToolIdentifyFeature default cursor hotspot is incorrect

#2 Updated by Salvatore Larosa almost 6 years ago

  • Category set to Map Tools
  • Pull Request or Patch supplied changed from No to Yes

Could the following patch work?

diff --git a/src/gui/qgsmaptoolidentifyfeature.cpp b/src/gui/qgsmaptoolidentifyfeature.cpp
index 1669d2f..c7e5e6d 100644
--- a/src/gui/qgsmaptoolidentifyfeature.cpp
+++ b/src/gui/qgsmaptoolidentifyfeature.cpp
@@ -28,7 +28,7 @@ QgsMapToolIdentifyFeature::QgsMapToolIdentifyFeature( QgsMapCanvas* canvas, QgsV

   // set cursor
   QPixmap cursorPixmap = QPixmap(( const char ** ) cross_hair_cursor );
-  mCursor = QCursor( cursorPixmap, 1, 1 );
+  mCursor = QCursor( cursorPixmap );


#3 Updated by Giovanni Manghi over 5 years ago

  • Regression? set to No
  • Easy fix? set to No

#4 Updated by Giovanni Manghi over 3 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF