Ignore:
Timestamp:
Apr 2, 2016, 10:01:11 PM (8 years ago)
Author:
chronos
Message:
  • Modified: Parameters for next scan operation is not stored separatelly from scans itself. So changing parameters will not affect current selected scan item.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Form/UFormMain.pas

    r18 r19  
    230230    DriveInfo.Assign(TDriveInfo(ComboBoxDrive.Items.Objects[ComboBoxDrive.ItemIndex]));
    231231    Modified := True;
    232     CurrentScan.SectorCount := DriveInfo.SectorCount;
    233     CurrentScan.SectorSize := DriveInfo.SectorSize;
    234     CurrentScan.SectorStart := 0;
    235     CurrentScan.SectorEnd := CurrentScan.SectorCount - 1;
    236     CurrentScan.Reset;
     232    Core.Project.ScanProfile.SectorCount := DriveInfo.SectorCount;
     233    Core.Project.ScanProfile.SectorStart := 0;
     234    Core.Project.ScanProfile.SectorEnd := Core.Project.ScanProfile.SectorCount - 1;
    237235    UpdateInterface;
    238236    Redraw;
     
    247245    CurrentScan.SectorCount := DriveInfo.SectorCount;
    248246    CurrentScan.SectorSize := DriveInfo.SectorSize;
     247    Core.Project.ScanProfile.SectorCount := Core.Project.DriveInfo.SectorCount;
     248    CurrentScan.LoadProfile(Core.Project.ScanProfile);;
    249249    CurrentScan.Reset;
    250250    CurrentScan.OnChange := DriveScanChange;
     
    353353procedure TFormMain.AOperationOptionsExecute(Sender: TObject);
    354354begin
    355   FormOperation.Load(Core.Project.CurrentScan);
     355  Core.Project.ScanProfile.SectorCount := Core.Project.DriveInfo.SectorCount;
     356  FormOperation.Load(Core.Project.ScanProfile);
    356357  if FormOperation.ShowModal = mrOk then begin
    357     FormOperation.Save(Core.Project.CurrentScan);
     358    FormOperation.Save(Core.Project.ScanProfile);
    358359    Core.Project.Modified := True;
    359360    UpdateInterface;
Note: See TracChangeset for help on using the changeset viewer.