summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/gui_button.pas8
-rw-r--r--src/gui/gui_form.pas6
2 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/gui_button.pas b/src/gui/gui_button.pas
index b1225d50..5d9f9eef 100644
--- a/src/gui/gui_button.pas
+++ b/src/gui/gui_button.pas
@@ -379,6 +379,7 @@ begin
begin
FDown := False;
RePaint;
+ fpgApplication.ProcessMessages;
if PtInRect(r, Point(x, y)) then
Click;
end;
@@ -386,10 +387,13 @@ begin
else
begin
if FDown and FClicked then
+ begin
+ FDown := False;
+ RePaint;
+ fpgApplication.ProcessMessages;
if PtInRect(r, Point(x, y)) then
Click;
- FDown := False;
- RePaint;
+ end;
end;
FClickOnPush := False;
diff --git a/src/gui/gui_form.pas b/src/gui/gui_form.pas
index abcee416..843345d1 100644
--- a/src/gui/gui_form.pas
+++ b/src/gui/gui_form.pas
@@ -237,7 +237,7 @@ end;
function TfpgForm.ShowModal: integer;
var
- CloseAction: TCloseAction;
+ lCloseAction: TCloseAction;
begin
FWindowType := wtModalForm;
fpgApplication.PushModalForm(self);
@@ -266,8 +266,8 @@ begin
if ModalResult <> 0 then
begin
- CloseAction := caFree; // Dummy variable - we do nothing with it
- DoOnClose(CloseAction); // Simply so the OnClose event fires.
+ lCloseAction := caFree; // Dummy variable - we do nothing with it
+ DoOnClose(lCloseAction); // Simply so the OnClose event fires.
end;
end;