Changeset 65 for trunk/UTarget.pas


Ignore:
Timestamp:
Dec 5, 2014, 8:34:59 PM (10 years ago)
Author:
chronos
Message:
  • Added: Confirmation dialog for closing and saving file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTarget.pas

    r64 r65  
    3232    function SearchByTargetPos(Pos: Integer): TDebugStep;
    3333    procedure AddStep(SourcePos, TargetPos: Integer; Operation: TStepOperation);
     34    procedure UpdateTargetPos(Old, New: Integer);
    3435  end;
    3536
     
    271272end;
    272273
     274procedure TDebugStepList.UpdateTargetPos(Old, New: Integer);
     275var
     276  I: Integer;
     277begin
     278  I := 0;
     279  while (I < Count) do begin
     280    if TDebugStep(Items[I]).TargetPosition = Old then
     281      TDebugStep(Items[I]).TargetPosition := New;
     282    Inc(I);
     283  end;
     284end;
     285
    273286
    274287{ TTargetList }
     
    594607      end;
    595608    end;
     609    DebugSteps.UpdateTargetPos(FProgramIndex, NewProgramIndex);
    596610    Inc(FProgramIndex);
    597611    Inc(NewProgramIndex);
     
    734748    end;
    735749    PreviousCommand := FProgram[FProgramIndex].Command;
     750    DebugSteps.UpdateTargetPos(FProgramIndex, NewProgramIndex);
    736751    Inc(FProgramIndex);
    737752    Inc(NewProgramIndex);
Note: See TracChangeset for help on using the changeset viewer.