Skip to content

d.barscale: Correct the length option description - #8069

Merged
petrasovaa merged 1 commit into
OSGeo:mainfrom
Valyrian-Code:d.barscale-length-label
Oct 15, 2026
Merged

petrasovaa merged 1 commit into
OSGeo:mainfrom
Valyrian-Code:d.barscale-length-label

Conversation

@Valyrian-Code

Copy link
Copy Markdown
Contributor
  • the length label says map units, but draw_scale() reads it in whatever units is set to, and only uses map units when units is not given
  • I hit this on Vector analysis tutorial: new NC dataset grass-tutorials#149, where length=5000, units="kilometers" drew a 5000 km bar
  • checked by measuring rendered bars: length=5000 with no units and length=5 units=kilometers give the same 5 km bar, and length=3 units=miles matches 4.8 km
  • the default 0 picks a length by itself, which the description now says too

The label said the length is in map units, but draw_scale() reads it in the
units given by the units option and only falls back to map units when that is
not set, so length=5000 units=kilometers draws a 5000 km bar. Say so, and note
that the default of 0 picks a length automatically.
Copilot AI balanced review requested due to automatic review settings October 14, 2026 18:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added C Related code is in C module display labels Oct 14, 2026

@petrasovaa petrasovaa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@petrasovaa
petrasovaa merged commit 49e8fcc into OSGeo:main Oct 15, 2026
26 checks passed
@github-actions github-actions Bot added this to the 8.6.0 milestone Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C Related code is in C display module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants