Roassal bug: remove labelled edge and the label stays

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Roassal bug: remove labelled edge and the label stays

jfabry
Hola,

I found a bug in Roassal: if an edge is labeled, and that edge is removed from the view at some point (using removeEdge:) then the label does not go away. This is quite annoying, given that my latest project adds and removes a lot of edges in the visualization on a frequent basis. :-(

I verified this bug in the latest build. Code to reproduce is below.

“From RTRoassalExample>>exampleArrowedAndLabelledLine. Last line is new”

| v e1 e2 l |
v := RTView new.

e1 := (RTEllipse new size: 20) elementOn: 'hello'.
e2 := (RTEllipse new size: 20) elementOn: 'world'.

e1 @ RTDraggable.
e2 @ RTDraggable.

l := RTEdge from: e1 to: e2.
l + (RTLine new color: Color red).
l + (RTSimpleArrowHead new color: Color red).

e2 translateBy: 60 @ 80.
v addAll: { e1 . e2 . l }.

e1 @ RTLabelled.
e2 @ RTLabelled.

"Note that the RTLabelled interaction has to be set after having added the element in the view"
l @ (RTLabelled new text: 'lining up!').

v open.
v canvas.

v removeEdge: l   “THIS IS THE NEW LINE"


---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev