Add isDisposed checking to avoid unexpected NPE In this case ctx.getContentContext() would return null when the canvas context was already disposed. gitlab #614 (cherry picked from commit 930da66f9b2d7d1acba3e5dc805a323933abb780)
Replace scheduleAtFixedRate with scheduleWithFixedDelay ScheduledExecutorService.scheduleAtFixedRate tends to run enormous amounts of runnables that would have been scheduled during a machine is in sleep, after the machines wakes up from sleep, retroactively. This is not good and can be avoided by using scheduleWithFixedDelay which is usually good enough regarding the delay between executions. gitlab #531 Change-Id: I4ac3b11f1f9236d411debb352fce610c33410659
Handle SelectionOutline interface implementation in SCLScenegraph Created custom SelectionShapeNode class for outline highlights, so that SCLScenegraph can process outline as selection. Change-Id: Ieeaa47618a8c94f07d9b482c9a3d77044852f2ba (cherry picked from commit 37c78d83578e57c8bb858d51591446994405b617)
Allow PickSorter access to the PickRequest used for pick operation New default-method on the PickSorter interface keeps the API/ABI backwards compatible. gitlab #454 Change-Id: Icef2d4b5349bbbbfb275d9c1e6a2ecaac8d610b7
G2DParentNode handles "undefined" child bounds separately Previously nodes could only return null to say "I have no bounds". Now it is possible to return GeometryUtils.undefinedBounds() to say "ignore my bounds" to G2DParentNode. Also allow customization of the node class used by ElementPainter to mark selections under "element nodes" through a new configuration class ElementPainterConfiguration. This allows e.g. district to use its own node for this purpose to optimize the scene graph and customize the bounds it returns. gitlab #419 Change-Id: I210fd26be5d269847277616b9d5c52ef4f930dd7 (cherry picked from commit ad29e24f50e336add4c28df14312b3134ab93427)
Fixed two problems in connecting picking Tolerance was incorrectly subtracted instead of added in RouteLine picking. RouteGraphConnectionClass did not take selection stroke width into account when doing coarse picking based on bounding box. gitlab #396 Change-Id: I6dabe7297eb553f0894c4299c393bb5369b45866
Take zoom level into account when picking connections Also fixed RouteGraphConnectTool.pickNearestRouteGraphConnection which gave flawed results. Visual hints are fixed to match the performed actions. This versions always picks the closest connection if there are multiple hits. gitlab #396 Change-Id: Ib5d8be3b2c7301dae5545166c07e11c03f92a50d
Moved RouteGraphConnectionClass to org.simantics.g2d.elementclass Previously the class was in bundle org.simantics.diagram, which depends on database bundles and other things that RouteGraphConnectionClass does not need or use. In #396 the RouteGraphConnectionClass.KEY_RG_NODE would be needed in org.simantics.g2d and therefore it makes sense to move it there. gitlab #410 Change-Id: I491b8caeffa1a3c455af7815ce9372a9e5df722e
Two rendering glitch fixes for time series charts 1. Grid values were not rendered properly when the [yMin,yMax] interval gets too small (under 1e-6). The calculations in GridSpacing.makeGridSpacing contain a capping logic for parameter viewboxSize which doesn't necessarily have to be there (IMHO). The problem is essentially that auto-scaling the Y-axis allows zooming to any small value interval, but the vertical ruler rendering just doesn't work properly in those cases. 2. GridUtil.calcLabelWidth calculated the rendered Y-value labels differently from the rendering logic in GridUtil.paintVerticalRuler and GridUtil.paintVerticalSlaveRuler, i.e. in a more inprecise manner which results in the y-axis reserved width not following properly what is rendered. gitlab #392 Change-Id: I30998d9336e50606956a78ad547ee437e0439f1a