]> gerrit.simantics Code Review - simantics/district.git/commit
Fixed two selection/picking related bugs 85/3585/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 20 Nov 2019 14:43:29 +0000 (16:43 +0200)
committerReino Ruusu <reino.ruusu@semantum.fi>
Wed, 20 Nov 2019 15:17:55 +0000 (15:17 +0000)
commit290f621728aa09db5a719f9e7a29d4e342d25425
tree9e916d88024c74eb1c6348f94d7eee63b48781cb
parent35bbcd22d5b667e88fb41aa98dfd772d0ab3ebe4
Fixed two selection/picking related bugs

1. RTreeNode bounds calculation now always uses the detailed geometry of
   district edge nodes to calculate their bounds. This fixes picking to
   work in cases where the detailed geometry falls much outside of the
   spanning rectangle of the edge's end vertices.
2. Introduced DistrictSelectionNode that tells G2DParentNode to ignore
   its bounds instead of nullifying them entirely. This caused the edge
   nodes to fall outside the R-tree as "boundless nodes" which caused
   the most optimized R-tree based picking to fail entirely for nodes
   that are selected when RTreeNode.decompose is executed.

gitlab #68
gitlab #69

Change-Id: I119f33a04923b9b4bf06a8229cfccedc520588cb
org.simantics.district.network.ui/src/org/simantics/district/network/ui/DistrictDiagramViewer.java
org.simantics.district.network.ui/src/org/simantics/district/network/ui/adapters/DistrictNetworkEdgeElement.java
org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkEdgeNode.java
org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictSelectionNode.java [new file with mode: 0644]