Procedure

TfrmDiagnoses.EnsurePrimaryDiag

Module

fDiagnoses

Last Modified

3/11/2015 8:41:48 AM

Visibility

Private

Owner

TfrmDiagnoses

Declaration

procedure EnsurePrimaryDiag;

Calls Hierarchy


TfrmDiagnoses.EnsurePrimaryDiag
 ├TfrmPCEBaseGrid.SetGridIndex
 │ └TfrmPCEBaseGrid.UpdateControls
 └TfrmPCEBaseMain.GridChanged
   ├TfrmPCEBaseMain.BeginUpdate
   ├TfrmPCEBaseGrid.SaveGridSelected
   ├TPCEItem.ItemStr
   ├TfrmPCEBaseGrid.RestoreGridSelected
   ├TfrmPCEBaseGrid.SyncGridData
   │ ├TfrmPCEBaseGrid.SaveGridSelected
   │ ├TfrmPCEBaseGrid.RestoreGridSelected
   │ └TfrmPCEBaseGrid.SyncGridHeader
   ├TfrmPCEBaseMain.EndUpdate
   └TfrmPCEBaseMain.UpdateControls
     ├TfrmPCEBaseMain.NotUpdating
     ├TfrmPCEBaseMain.BeginUpdate
     ├TfrmPCEBaseGrid.GetGridIndex
     └TfrmPCEBaseMain.EndUpdate

Called-By Hierarchy


     TfrmDiagnoses.EnsurePrimaryDiag
      TfrmDiagnoses.btnRemoveClick┤ 
TfrmDiagnoses.lbxSectionClickCheck┘ 

Calls

Name Declaration Comments
TfrmPCEBaseMain.GridChanged procedure GridChanged; virtual; -
TfrmPCEBaseGrid.SetGridIndex procedure SetGridIndex(const Value: integer); -

Called-By

Name Declaration Comments
TfrmDiagnoses.btnRemoveClick procedure btnRemoveClick(Sender: TObject); -
TfrmDiagnoses.lbxSectionClickCheck procedure lbxSectionClickCheck(Sender: TObject; Index: Integer); -


Source

122   procedure TfrmDiagnoses.EnsurePrimaryDiag;
123   var
124     i: Integer;
125     Primary: Boolean;
126   
127   begin
128     with lbGrid do
129     begin
130       Primary := False;
131       for i := 0 to Items.Count - 1 do
132         if TPCEDiag(Items.Objects[i]).Primary then
133           Primary := True;
134   
135       if not Primary and (Items.Count > 0) then
136       begin
137         GridIndex := Items.Count - 1;//0; zzzzzzbellc CQ 15836
138         TPCEDiag(Items.Objects[Items.Count - 1]).Primary := True;
139         GridChanged;
140       end;
141     end;
142   end;