99,111c99,106 < setTargetFigure(findConnectionStart(ex, ey, drawing())); < if (getTargetFigure() != null) { < setStartConnector(findConnector(ex, ey, getTargetFigure())); < if (getStartConnector() != null) { < setConnection(createConnection()); < getConnection().startPoint(ex, ey); < getConnection().endPoint(ex, ey); < setAddedFigure(view().add(getConnection())); < } < } < else { < // Since we can't connect to the figure, see if its a Connection < // object we can modify the appearance of. --- > > /* > * JP, 25-May-03: Swapped checking for underlying figure and > * existing connection. If figure is checked first (old version), > * it is not possible to insert new points into a connection that > * crosses or otherwise goes through an existing figure. New > * version checks for connection first. > */ 121a117,127 > else { > setTargetFigure(findConnectionStart(ex, ey, drawing())); > if (getTargetFigure() != null) { > setStartConnector(findConnector(ex, ey, getTargetFigure())); > if (getStartConnector() != null) { > setConnection(createConnection()); > getConnection().startPoint(ex, ey); > getConnection().endPoint(ex, ey); > setAddedFigure(view().add(getConnection())); > } > }