-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
'Using perimeter (curved)' labels on polygon layers will now respect …
…'Show upside-down labels' setting.
- Loading branch information
1 parent
d6b419a
commit 34e2bea
Showing
6 changed files
with
169 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
34e2bea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nyalldawson

I have one layer, where the labels are shown on the wrong size of the polygon. They should be on the inside. Is there such a thing as an inverted polygon in a database? I've also drawn an inner glow, and that is shown correctly. I can see in QgsSymbol::renderFeature that a MultiPolygon is drawn, but that is also true for other layers, which are ok. I'm a bit at a loss here.
34e2bea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nyalldawson


I've attached some more examples. Only Katwijk is displayed correctly in 2.99.0, that is with labels inside the polygon. In 2.16.1 the polygons which are cutoff are also displayed with labels inside. Can you provide some hints how I can proceed to investigate this?
Oh, curved or straight labels exhibit the same problem.
34e2bea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fritsvanveen my usual approach here is to enable labels both above and below the line, and then enable the option to only draw labels which fit inside the polygon.
BTW - i've noticed since your last commit re upside down labels that many curved labels for line geometry layers are now drawn incorrectly upside down. Are you able to look into this?
34e2bea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nyalldawson Also for polygon layers. I'll look into it.
34e2bea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nyalldawson Just a quick update. The upsidedown bug is fixed. Variable 'orientation' should have been primed inside the for loop. However, with 'Line orientation dependent position' off, some labels are plotted on the wrong side of the line.
34e2bea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fritsvanveen great! is there an updated commit I should be looking at, or will you update the PR?
34e2bea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nyalldawson Not yet, let's wait until I fixed the other bug.
34e2bea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nyalldawson I'm confused about these lines in createCandidatesAlongLineNearStraightSegment
Should the comment not read 'using map orientation'
34e2bea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - sounds like that comment is wrong
34e2bea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nyalldawson Made a commit on my fork https://github.com/fritsvanveen/QGIS
34e2bea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nyalldawson Made another commit on my fork https://github.com/fritsvanveen/QGIS
Ik works now, but I want to clean up the code.
34e2bea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nyalldawson Cleaned up code committed.