Topic: Suggestion: Don't Move Connector-object When ....

hi Michael (and others),

I just made a modification, that makes drawing/editing of connected objects much more pleasant (at least in my experience).
I don't allow moving a TBaseConnectorObject if at least one of it's ends is connected to another object. This garantees that it's not anymore possible to disconnect objects by accident or a spontaneous mouse move.

function TBaseConnectorObject.Move(DX,DY: Integer; Handle: Integer; const Grid: TPoint; Shift: TShiftState): TPoint;
var
  ActivePoint, Other : PPoint;
begin
  case Handle of
    1 : ActivePoint:=@P1;
    2 : ActivePoint:=@P2;
    else
      begin



-- replaced by
function TBaseConnectorObject.Move(DX,DY: Integer; Handle: Integer; const Grid: TPoint; Shift: TShiftState): TPoint;
var
  ActivePoint, Other : PPoint;
begin
  case Handle of
    1 : ActivePoint:=@P1;
    2 : ActivePoint:=@P2;
    else
      begin
//prevent moving a connectorobject,
//when at least one it's ends is connected to another object
if (FlinkObjects[1].obj<>nil) or
   (FlinkObjects[2].obj<>nil) then
begin
  result.X:=0;
  result.Y:=0;
  exit;
end;

Stef Mientki