]> gerrit.simantics Code Review - simantics/district.git/commit
Fixed two selection/picking related bugs 83/3583/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 20 Nov 2019 14:43:29 +0000 (16:43 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 20 Nov 2019 14:43:29 +0000 (16:43 +0200)
commitfc0692ca865e5805cd9f490ba29b1d12b2296fdd
tree26933faf411ee962ee24c02a1f102b6e3b5431da
parentc1726716f6ef9b44fd195852e41f69a3ece853b7
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]