Skip to content

Commit

Permalink
checking if points are equal before adding and enabling map label mou…
Browse files Browse the repository at this point in the history
…se area only if canCloseShape
  • Loading branch information
VitorVieiraZ committed Oct 21, 2024
1 parent 1f39fc6 commit 8e9a40e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions app/maptools/measurementmaptool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ void MeasurementMapTool::addPoint()
if ( mapSettings() )
{
QgsPoint transformedPoint = mapSettings()->screenToCoordinate( mCrosshairPoint );

if ( !mPoints.empty() && transformedPoint == mPoints.back() )
return;

mPoints.push_back( transformedPoint );
rebuildGeometry();
}
Expand Down
6 changes: 2 additions & 4 deletions app/qml/map/components/MMMeasureCrosshair.qml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,8 @@ Item {

MouseArea {
anchors.fill: parent
onClicked: {
if ( root.canCloseShape )
root.closeShapeClicked()
}
enabled: root.canCloseShape
onClicked: root.closeShapeClicked()
}
}
}

1 comment on commit 8e9a40e

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

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

iOS - version 24.10.687111 just submitted!

Please sign in to comment.