|Re: Active Shapes problem [message #1222022 is a reply to message #1221884]
||Thu, 19 December 2013 12:51
| Martin Hanysz
Registered: November 2013
I already tried setting s2 to inactive, but that also disables the rendering of its GraphicsAlgorithm. Adding the GraphicsAlgorithm of s2 as a child to the GraphicsAlgorithm of cs is also not possible, because cs is inactive, too.
I finally decided to introduce a "disabled" boolean property that I set for every decoration shape and check in every other feature first. If a PictogramElement has this property set to true, the features that are considered user interaction (move, resize, remove, delete...) simply do nothing. Since the "disabled" shapes are handled programmatically once other shapes are manipulated, the user can still move, resize or remove them.
First I tried returning false in the can*() method of these features, but that caused another problem. If the user selects multiple PictogramElements with the marquee tool and then tries to move all of them, the mouse cursor turns into the red forbidden symbol once the respective move feature returns false for at least one of the selected PictogramElements.
Even if your suggestions didn't solve this particular problem, pointing out the possibility to nest GraphicsAlgorithms into each other helped me at some other points, so thanks for that
[Updated on: Thu, 19 December 2013 12:52]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01731 seconds