View Issue Details

IDProjectCategoryView StatusLast Update
0020150LazarusIDEpublic2011-09-06 02:44
ReporterFlávio Etrusco (notifications not working)Assigned ToMaxim Ganetsky 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.9.31 (SVN)Product Build 
Target VersionFixed in Version0.9.31 (SVN) 
Summary0020150: TCompileInfoDlg.FormClose should disable tmrCloseForm timer
DescriptionTCompileInfoDlg (the compile progress dialog) has a timer (seemingly to just let the user read compilation result for 2s after completion) that calls the form Close, but is just hidden, not destroyed, and the timer is never disabled (and the LCL doesn't care/handle the form is already "closed"), making the environment settings be saved every 2s.

Also, I guess it should check "EnvironmentOptions.AutoCloseCompileDialog <> cbAutoCloseOnSuccess.Checked" before saving?
TagsNo tags attached.
Fixed in Revision32192
LazTarget-
Widgetset
Attached Files
  • CompilerProgress-fix-disabling-timer-r32187.patch (909 bytes)
    diff --git ide/infobuild.pp ide/infobuild.pp
    index 42ee5b3..3d35bfc 100644
    --- ide/infobuild.pp
    +++ ide/infobuild.pp
    @@ -130,8 +130,12 @@ end;
     
     procedure TCompileInfoDlg.FormClose(Sender: TObject; var CloseAction: TCloseAction);
     begin
    -  EnvironmentOptions.AutoCloseCompileDialog := cbAutoCloseOnSuccess.Checked;
    -  EnvironmentOptions.Save(False);
    +  tmrCloseForm.Enabled := False;
    +  if EnvironmentOptions.AutoCloseCompileDialog <> cbAutoCloseOnSuccess.Checked then
    +  begin
    +    EnvironmentOptions.AutoCloseCompileDialog := cbAutoCloseOnSuccess.Checked;
    +    EnvironmentOptions.Save(False);
    +  end;
     end;
     
     procedure TCompileInfoDlg.FormCreate (Sender: TObject);
    @@ -171,7 +175,8 @@ end;
     
     procedure TCompileInfoDlg.tmrCloseFormTimer(Sender: TObject);
     begin
    -  Close;
    +  tmrCloseForm.Enabled := False;
    +  if Showing then Close;
     end;
     
     procedure TCompileInfoDlg.SetProjectName(const Sname : String);
    

Activities

Maxim Ganetsky

2011-09-05 22:55

developer   ~0051485

Will you create a patch?

2011-09-05 23:33

 

CompilerProgress-fix-disabling-timer-r32187.patch (909 bytes)
diff --git ide/infobuild.pp ide/infobuild.pp
index 42ee5b3..3d35bfc 100644
--- ide/infobuild.pp
+++ ide/infobuild.pp
@@ -130,8 +130,12 @@ end;
 
 procedure TCompileInfoDlg.FormClose(Sender: TObject; var CloseAction: TCloseAction);
 begin
-  EnvironmentOptions.AutoCloseCompileDialog := cbAutoCloseOnSuccess.Checked;
-  EnvironmentOptions.Save(False);
+  tmrCloseForm.Enabled := False;
+  if EnvironmentOptions.AutoCloseCompileDialog <> cbAutoCloseOnSuccess.Checked then
+  begin
+    EnvironmentOptions.AutoCloseCompileDialog := cbAutoCloseOnSuccess.Checked;
+    EnvironmentOptions.Save(False);
+  end;
 end;
 
 procedure TCompileInfoDlg.FormCreate (Sender: TObject);
@@ -171,7 +175,8 @@ end;
 
 procedure TCompileInfoDlg.tmrCloseFormTimer(Sender: TObject);
 begin
-  Close;
+  tmrCloseForm.Enabled := False;
+  if Showing then Close;
 end;
 
 procedure TCompileInfoDlg.SetProjectName(const Sname : String);
Absolutely :)
I'm not very positive about the change in the timer handler, it just seemed a good idea because there's the TCompileProgress.Hide method which calls Hide instead of Close for the form... (that means: feel free to remove that part, I have no strong point for it)

Flávio Etrusco (notifications not working)

2011-09-05 23:43

developer   ~0051488

Last edited: 2011-09-06 00:37

BTW would it be helpful in such cases that I assign the issue to you? Or change its status? Or should I just leave it alone?

Maxim Ganetsky

2011-09-06 02:43

developer   ~0051496

Applied, thanks.

As for bug status in such cases, just leave it alone.

Issue History

Date Modified Username Field Change
2011-09-05 11:45 Flávio Etrusco (notifications not working) New Issue
2011-09-05 11:45 Flávio Etrusco (notifications not working) LazTarget => -
2011-09-05 11:45 Flávio Etrusco (notifications not working) Widgetset => Win32/Win64
2011-09-05 22:55 Maxim Ganetsky Widgetset Win32/Win64 =>
2011-09-05 22:55 Maxim Ganetsky Status new => resolved
2011-09-05 22:55 Maxim Ganetsky Resolution open => fixed
2011-09-05 22:55 Maxim Ganetsky Assigned To => Maxim Ganetsky
2011-09-05 22:55 Maxim Ganetsky Note Added: 0051485
2011-09-05 22:55 Maxim Ganetsky Status resolved => feedback
2011-09-05 22:55 Maxim Ganetsky Resolution fixed => open
2011-09-05 22:56 Maxim Ganetsky Assigned To Maxim Ganetsky =>
2011-09-05 23:33 Flávio Etrusco (notifications not working) File Added: CompilerProgress-fix-disabling-timer-r32187.patch
2011-09-05 23:39 Flávio Etrusco (notifications not working) Note Added: 0051487
2011-09-05 23:43 Flávio Etrusco (notifications not working) Note Added: 0051488
2011-09-06 00:37 Flávio Etrusco (notifications not working) Note Edited: 0051488
2011-09-06 02:13 Maxim Ganetsky Status feedback => assigned
2011-09-06 02:13 Maxim Ganetsky Assigned To => Maxim Ganetsky
2011-09-06 02:43 Maxim Ganetsky Fixed in Revision => 32192
2011-09-06 02:43 Maxim Ganetsky Status assigned => resolved
2011-09-06 02:43 Maxim Ganetsky Fixed in Version => 0.9.31 (SVN)
2011-09-06 02:43 Maxim Ganetsky Resolution open => fixed
2011-09-06 02:43 Maxim Ganetsky Note Added: 0051496