summaryrefslogtreecommitdiff
path: root/src/gui/gui_listbox.pas
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui_listbox.pas')
-rw-r--r--src/gui/gui_listbox.pas7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/gui_listbox.pas b/src/gui/gui_listbox.pas
index e85629dc..a1448803 100644
--- a/src/gui/gui_listbox.pas
+++ b/src/gui/gui_listbox.pas
@@ -415,13 +415,12 @@ begin
keyReturn:
begin
- DoSelect;
+ if FocusItem > 0 then
+ DoSelect;
consumed := false; // to allow the forms to detect it
end;
else
- begin
- consumed := false;
- end;
+ consumed := false;
end;
inherited HandleKeyPress(keycode, shiftstate, consumed);
end;