Skip to content

Commit

Permalink
Rename aboutToZoom to aboutToWheelZoom and emit it.
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsenD98 authored and nirvn committed Oct 25, 2024
1 parent 90dadbc commit e315820
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/qml/MapCanvas.qml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Item {
signal longPressReleased(var type)

//! Emitted when a zoom action is about to occur, allowing for pre-zoom adjustments
signal aboutToZoom
signal aboutToWheelZoom

/**
* Freezes the map canvas refreshes.
Expand Down Expand Up @@ -447,6 +447,7 @@ Item {
grabPermissions: PointerHandler.CanTakeOverFromHandlersOfDifferentType | PointerHandler.ApprovesTakeOverByItems

onWheel: event => {
aboutToWheelZoom();
if (event.angleDelta.y > 0) {
zoomIn(point.position);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/qml/qgismobileapp.qml
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ ApplicationWindow {
}
}

onAboutToZoom: {
onAboutToWheelZoom: {
if (gnssButton.followActive)
gnssButton.followActiveSkipExtentChanged = true;
}
Expand Down

1 comment on commit e315820

@qfield-fairy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.