]> gerrit.simantics Code Review - simantics/platform.git/commit
Fix NPE from flagTransform 63/4363/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 21 Aug 2020 12:29:39 +0000 (15:29 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 21 Aug 2020 13:23:46 +0000 (13:23 +0000)
commit617b9475710b80a125597f222f9777224972ce72
tree346c86db8e73891502cb998ecd44447b4db14201
parent2ccc058ac6c303b64a70ad0f0c48ca501bf4aa6a
Fix NPE from flagTransform

The bug affected loading of route graph connections about to be split in
half when attached to diagram flags at either or both ends.

The NPE caused the flag terminal position to receive identity transform
as value which is plain wrong. This in turn resulted in the splitting
position being completely wrong compared to what the user requested and
the result looking very strange.

This fixes the immediate problem but still doesn't work properly if the
flag is actually attached to a diagram template flag table. In this case
the terminal's position will be incorrectly calculated since
runtimeDiagram is null. This needs another issue.

gitlab #586

Change-Id: If09524c71c701f2c1190d0f915aafbb972c51da4
(cherry picked from commit 2526602db10c29f0c30c4a3cffaf33012d9c4a0e)
bundles/org.simantics.diagram/src/org/simantics/diagram/function/All.java