Page MenuHomePhabricator

PlanarFigureInteractor triggers unnecessary events on interaction
Closed, ResolvedPublic

Description

The PlanarFigureInteractor triggers some unnecessary events, e.g. when you click onto a PlanarFigure that has already reached its maximum number of control-points.

Furthermore it invokes a EndInteractionPlanarFigureEvent() in AcDESELECTPOINT even if nothing has actually happened because no control point was selected in the first place.

Two minor issues that decrease performance and can trigger unwanted events.

Event Timeline

New remote branch pushed: bug-14326-planarfigureInteractor-invokes-too-many-events

New remote branch pushed: bug-14326-planarFigureInteractor-tuning-rebased

[995832]: Merge branch 'bug-14326-planarFigureInteractor-tuning-rebased'

Merged commits:

2013-01-22 17:33:03 Markus Engel [eb4705]
added parameter to know if control point has really been deselected

I have fixed the two issues that I described earlier.

Now the PlanarFigure returns a bool in the DeselectControlPoint() method that represents whether something has actually changed or not. Thus it's possible to abstain from expensive operations if nothing has happended.

This is used in the PlanarFigureInteractor, as it does no longer invoke events on AcDESELECTPOINT if no control point has actualy been deselected (as non was selected previously).
Furthermore the PlanarFigureInteractor does nothing in AcAddPoint if not point can be added as we have already reached the maximum number of control-points for a PlanarFigure.