@Override public void stopDragging(DrawingController controller, GraphicalRepresentation focusedGR) { if (beforePreviousSegment != null && beforePreviousSegment.overlap(currentSegment)) { getConnector()._simplifyLayoutOfCurrentPolylinByDeletingTwoPoints(index - 1); } if (afterNextSegment != null && afterNextSegment.overlap(currentSegment)) { getConnector()._simplifyLayoutOfCurrentPolylinByDeletingTwoPoints(index + 1); } super.stopDragging(controller, focusedGR); }