From 8d6f135f33471624a87f6864f0c0879f0bd0ee3f Mon Sep 17 00:00:00 2001 From: graemeg Date: Mon, 21 Apr 2008 06:42:38 +0000 Subject: * EditCombo fixes by jean-marc. --- src/gui/gui_editcombo.pas | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/gui/gui_editcombo.pas b/src/gui/gui_editcombo.pas index fee9ec70..8d428e29 100644 --- a/src/gui/gui_editcombo.pas +++ b/src/gui/gui_editcombo.pas @@ -278,8 +278,6 @@ begin else begin FSelectedItem := -1; - if Assigned(FDropDown) then - FDropDown.Close; for i := 0 to FItems.Count - 1 do begin if SameText(UTF8Copy(FItems.Strings[i], 1, UTF8Length(FText)), FText) then @@ -317,7 +315,7 @@ end; function TfpgAbstractEditCombo.HasText: boolean; begin - Result := FocusItem > 0; + Result := FFocusItem > 0; end; procedure TfpgAbstractEditCombo.DoDropDown; @@ -517,7 +515,7 @@ begin if FSelectedItem > -1 then SetText(Items[FSelectedItem]) else - SetText(''); + SetText(FText); FSelectedItem:= -4; // detects return has been pressed (must be 4 due to number of repaints) if FNewItem and (FAllowNew = anYes) then FItems.Add(FText); @@ -537,7 +535,7 @@ begin FSelOffset := 0; end; - if consumed then + if consumed and hasChanged then RePaint; if hasChanged then -- cgit v1.2.3-70-g09d2