Update not drawn [message #1795184] |
Tue, 18 September 2018 05:54  |
Frank Benoit Messages: 174 Registered: July 2009 |
Senior Member |
|
|
Hi
in my visual i want to react onto a model change by changing the end point of a line.
// org.eclipse.gef.geometry.planar.Line
// ..
GeometryNode<Line> line1 = newLine( 0.0, 30.0, 17.0, 30.0 );
// ..
Group group = new Group(shape, line1, line2, line3, point1, connectionLine );
In my handler i can change the background color, this works.
But when i change the lines end point, the change is not shown.
double y = selection ? 40 : 20;
System.out.println("sel "+y);
line1.getGeometry().setY2(y);
What could be the problem?
Frank
|
|
|
|
Re: Update not drawn [message #1801051 is a reply to message #1795185] |
Fri, 11 January 2019 16:51  |
|
Hi Frank,
until notifications are supported, there is no other correct way I could think of that is less elegant. (E.g. you could update the paths used for rendering under the hood, but then you also need to adjust the layout-xy and other properties of GeometryNode to match its rendering, which is already done when setting a geometry.)
Best regards,
Matthias
|
|
|
Powered by
FUDForum. Page generated in 0.02233 seconds