Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using many polygons, specially non-convex and tightly packed polygons, the selection mechanism essentially becomes useless - it might as well select polygons at random, and I often find myself cycling through all polygons with tab to get the one I want. It seems this is because the selection mechanism uses the bounding box, which tend to overlap greatly in this situation. Overriding the
shape()method of polygon seems to greatly improve the accuracy of selection. However, I should note that I have no knowledge of Qt, so there might be a better way. My googling didn't find anything else obviously better.One issue that still needs to be addressed is that it becomes impossible to select polygons buried under another one. This was still often the case before this modification. I'm thinking that clicking with a modifier key like shift could cycle between the polygons under the cursor, similar to how Inkscape does it. I could have a look at implementing this if there's interest.