ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/ibcontrols/IBLookupComboEditBox.pas
(Generate patch)

Comparing ibx/trunk/ibcontrols/IBLookupComboEditBox.pas (file contents):
Revision 142 by tony, Mon Jan 1 11:31:07 2018 UTC vs.
Revision 143 by tony, Fri Feb 23 12:11:21 2018 UTC

# Line 96 | Line 96 | type
96      FInCheckAndInsert: boolean;
97      FLastKeyValue: variant;
98      FCurText: string;
99 +    FModified: boolean;
100      procedure DoActiveChanged(Data: PtrInt);
101      function GetAutoCompleteText: TComboBoxAutoCompleteText;
102      function GetListSource: TDataSource;
# Line 122 | Line 123 | type
123      procedure SetItemIndex(const Val: integer); override;
124      function SQLSafe(aText: string): string;
125      procedure UpdateShowing; override;
126 <
126 >    procedure UpdateData(Sender: TObject); override;
127    public
128      { Public declarations }
129      constructor Create(TheComponent: TComponent); override;
# Line 360 | Line 361 | begin
361      finally
362        FUpdating := false
363      end;
364 +    FModified := true;
365    end;
366   end;
367  
# Line 551 | Line 553 | begin
553      ActiveChanged(nil);
554   end;
555  
556 + procedure TIBLookupComboEditBox.UpdateData(Sender: TObject);
557 + begin
558 +  inherited UpdateData(Sender);
559 +  FModified := false;
560 + end;
561 +
562   constructor TIBLookupComboEditBox.Create(TheComponent: TComponent);
563   begin
564    inherited Create(TheComponent);
# Line 583 | Line 591 | begin
591      FForceAutoComplete := false;
592    end;
593    CheckAndInsert;
594 +  if FModified then
595 +    Change; {ensure Update}
596    inherited EditingDone;
597   end;
598  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines