Style not applied when linking new links


#1

Hi,
I noticed a problem that happens in my application and also in the demo applications (after minor code changes).
If the link style is not line or is line and also orthogonal, and a new link is created the link is drawn using a non orthogonal line style ignoring Style/Orthogonal properties. After the link is created (that is mouse up), it redraws itself correctly.
The problem seems to be happening with new links only (GoToolLinking). I noticed that there is a CreateTemporaryLink method. Maybe it is not implemented correctly?
Relinking an existing link works ok, and the link is drawn correctly while dragging it.
Any fixes, workarounds
Yuval Naveh
Actimize


#2

There is a GoToolLinking.Orthogonal property, which controls the GoLink.Orthogonal property of the temporary link created by GoToolLinking.CreateTemporaryLink. Does setting this property give you the results you expect?
GoToolLinkingNew tool = myView.FindMouseTool(typeof(GoToolLinkingNew)) as GoToolLinkingNew;
tool.Orthogonal = true;
Maybe we should delete the GoToolLinking.Orthogonal property, letting the GoView.NewLinkClass type determine that and all the other properties of the temporary link. This is a sufficiently uncommonly used property that I can see making such an incompatible change.
Actually, CreateTemporaryLink also sets the temporary link’s AdjustingStyle property to GoLinkAdjustingStyle.Calculate. This is probably very desirable to continue doing.


#3

Well, the Orthogonal property of the GoToolLinkingNew does work and gives the results I expected.
But I think, as you wrote too, that the property is not needed. The tool should take all initial data from the NewLinkClass instance.
Otherwise, one has to hardcode the tool and the link class with the same properties so they match.
As for the CreateTemporaryLink AdjustingStyle - What if the link initially creates itself with predefined points? They all get deleted.
It seems more natural that the final link is an identical clone of the temp link. That is, after the mouse is up the final link will look exactly the same as the temp link. The end user does not know about temp or final links. But she will complain about inconsistencies.
Thanks for the workaround!
Yuval


#4

</>Had to deal with the same problem and the same solution. :-)