Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canvas location lock improvement. #5749

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mohsenD98
Copy link
Collaborator

PR Description:

At present, when the canvas location is locked and the user zooms in or out with a mouse, the lock will break.

Fix:

Using same approach in zoomInButton and zoomOutButton:

if (gnssButton.followActive)
        gnssButton.followActiveSkipExtentChanged = true;

Demo:

Now zooming in/out wont break lock.

Screencast.from.2024-10-19.16-49-36.webm

Currently when the canvas location is locked and the user zooms in or out using a mouse the location lock is broken because the position of cursor also changes while zooming
Initial work plan: When the canvas location is locked the cursor placement will not change while zooming in or out.
@mohsenD98 mohsenD98 self-assigned this Oct 19, 2024
@qfield-fairy
Copy link
Collaborator

qfield-fairy commented Oct 19, 2024

@mohsenD98 mohsenD98 requested a review from nirvn October 19, 2024 13:58
@nirvn
Copy link
Member

nirvn commented Oct 20, 2024

@mohsenD98 , we need to change this a bit so we don't introduce a "random" item id within MapCanvas.qml (makes it a lot harder to test individual components).

I'd go for adding a signal aboutToZoom(), and then add the logic in qgismobileapp.qml (where gnssButton lives) by listening for that signal.

This new signal is emitted when a zoom action is about to occur, allowing other components to react or make adjustments before the zoom takes place.
@mohsenD98
Copy link
Collaborator Author

@mohsenD98 , we need to change this a bit so we don't introduce a "random" item id within MapCanvas.qml (makes it a lot harder to test individual components).

I'd go for adding a signal aboutToZoom(), and then add the logic in qgismobileapp.qml (where gnssButton lives) by listening for that signal.

Good point 👍

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.

3 participants