Hello Valeriy; I think I’ve got it.
When one of the developers was adding ‘caching’ to the label positioning, they made a typo.
Notice that both x and y are being set to labelX. So the labels were not being drawn because they were far outside of the viewport.
Regarding the three scenarios in your video, I can’t yet explain all of the behavior:
- The first time setting up labels (through MapWindow5), the x and y are both zero, so that is why no labels are displayed. I will try to figure out if this is a bug in MapWindow, or as a result of the positional caching.
- The third time through, when they were only being displayed on multi-part shapes; I’m guessing that it falls through different code than this bug; but I will have to do more investigation. Note that with this code fix, the labels are reliably displayed on all shapes even after repeatedly clearing and resetting the Labels.
- Finally, I don’t yet know why this is not a bug in Shapefiles. That likewise will require additional debugging.
But that’s for another night. Either way, I will write up a Jira ticket and submit a code change for this bug.
Regards,
Jerry.