Skip to content

Conversation

merydian
Copy link
Collaborator

@merydian merydian commented Oct 2, 2025

The map cursor will now be a pointing finger when dialog is visible. Also, the cursor is no longer set application wide, but within the maptool class.

@merydian merydian self-assigned this Oct 2, 2025
@merydian merydian requested a review from koebi October 2, 2025 08:56
@koebi
Copy link
Collaborator

koebi commented Oct 2, 2025

Hey,
great find that we can set the cursor for the tool, not the whole application!
I am not quite sure though why that changes the logic on setting/resetting the cursor? The current approach looks a bit like we never reset the cursor, i.e. adding and adding and adding to the stack?

@merydian
Copy link
Collaborator Author

merydian commented Oct 6, 2025

As opposed to the cursor stack created by QApplication.setOverrideCursor(), there is no such stacking mechanism at the QWidget level. Each call to QWidget.setCursor() simply replaces the widget’s current cursor. See: https://doc.qt.io/qt-6/qwidget.html#cursor-prop

QgsMapTool controls a QgsMapCanvas instance, which inherits from QWidget, so this behavior applies here as well.

@koebi koebi merged commit 4c0c516 into main Oct 17, 2025
8 checks passed
@koebi koebi deleted the feat/improve-cursor-behaviour branch October 17, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants