fix direction of the start arrow marker in the layout polyline item (fix #59078) - #66558
Conversation
🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. 🍎 MacOS Qt6 buildsDownload MacOS Qt6 builds of this PR for testing. |
Tests failed for Qt 6 (ALL_BUT_PROVIDERS - fedora)One or more tests failed using the build from commit 954a92b polygon3d_extrusion_textured_metalrough_displacement1 (testExtrudedPolygonsMetalRoughTexturedShadingDisplacement)polygon3d_extrusion_textured_metalrough_displacement1Test failed at testExtrudedPolygonsMetalRoughTexturedShadingDisplacement at tests/src/3d/testqgs3dmaterialrendering.cpp:1010 Rendered image did not match tests/testdata/control_images/3d/expected_polygon3d_extrusion_textured_metalrough_displacement1/expected_polygon3d_extrusion_textured_metalrough_displacement1.png (found 1293 pixels different) The full test report (included comparison of rendered vs expected images) can be found here. Further documentation on the QGIS test infrastructure can be found in the Developer's Guide. |
|
Doesn't this potentially break existing projects? I think we'll need to add a "version" number to the item to handle this -- so only newly created arrows behave this way, and existing arrow items render as they did before |
Only newly created arrows will have start and end arrow heads looking in the opposite directions, keeping behavior of the existing projects unchanged
|
Added "version" to the layout polyline item. Not sure if we need it in the base class |
|
The backport to stderrstdoutTo backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-queued_ltr_backports queued_ltr_backports
# Navigate to the new working tree
cd .worktrees/backport-queued_ltr_backports
# Create a new branch
git switch --create backport-66558-to-queued_ltr_backports
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 954a92b9533c6014b225b0bcf0e68578286f8f52 e73142ebd83c83815aa555d16dc0252be242c654 72cb4b6e52cd3bc8fc78adbe63165abc902a7012
# Push it to GitHub
git push --set-upstream origin backport-66558-to-queued_ltr_backports
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-queued_ltr_backportsThen, create a pull request where the |
|
The backport to stderrstdoutTo backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-3_44 release-3_44
# Navigate to the new working tree
cd .worktrees/backport-release-3_44
# Create a new branch
git switch --create backport-66558-to-release-3_44
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 954a92b9533c6014b225b0bcf0e68578286f8f52 e73142ebd83c83815aa555d16dc0252be242c654 72cb4b6e52cd3bc8fc78adbe63165abc902a7012
# Push it to GitHub
git push --set-upstream origin backport-66558-to-release-3_44
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-3_44Then, create a pull request where the |
Description
Layout arrow start marker points in the same direction as the end marker which is quite unexpected and inconsistent with other software where double-headed arrows point in the opposite directions. Also there is an inconsistency in arrow head positioning. The end arrow head is centered on the end point, while start arrow head points on the start point.
The rotation of the start arrow head is calculated using line heading from the start to the end while it should be the opposite, from the end to the start. The same rotation issue exists with the start SVG marker head.
As for the positioning, end arrow head takes into account arrow size and shifts position along the line direction to center arrow head on the end point. In case of the start arrow head we simply use start point without any offset.
Left — before, right — after.

Fixes #59078.
AI tool usage