summaryrefslogtreecommitdiff
path: root/src/gui/gui_editcombo.pas
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-04-21 06:42:38 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-04-21 06:42:38 +0000
commit8d6f135f33471624a87f6864f0c0879f0bd0ee3f (patch)
tree938c6bc2cefed681d3b0b60355e12d3912367191 /src/gui/gui_editcombo.pas
parent99be9f9acbf25d77910fe946226a729a6d2daa9e (diff)
downloadfpGUI-8d6f135f33471624a87f6864f0c0879f0bd0ee3f.tar.xz
* EditCombo fixes by jean-marc.
Diffstat (limited to 'src/gui/gui_editcombo.pas')
-rw-r--r--src/gui/gui_editcombo.pas8
1 files changed, 3 insertions, 5 deletions
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