Skip to content
Browse files

Introduce MainFormCreated flag, activate it when FormCreate has finis…

…hed, and use that to avoid too early calls to Application.ProcessMessages. Closes #665, hopefully.
  • Loading branch information...
ansgarbecker committed Jun 3, 2019
1 parent 3a891b8 commit 0500f12941c0b8815e6a3a4685ed794352ee502d
Showing with 8 additions and 0 deletions.
  1. +8 −0 source/main.pas
@@ -1204,6 +1204,7 @@ TMainForm = class(TForm)
MainForm: TMainForm;
SecondInstMsgId: UINT = 0;
SysLanguage: String;
MainFormCreated: Boolean = False;

CheckedStates = [csCheckedNormal, csCheckedPressed, csMixedNormal, csMixedPressed];
@@ -1981,6 +1982,8 @@ procedure TMainForm.FormCreate(Sender: TObject);
LogSQL(f_('Version: "%s"', [AppVersion]), lcDebug);
LogSQL(f_('Theme: "%s"', [TStyleManager.ActiveStyle.Name]), lcDebug);
LogSQL(f_('Pixels per inch on current monitor: %d', [Monitor.PixelsPerInch]), lcDebug);

MainFormCreated := True;

@@ -11787,6 +11790,11 @@ procedure TMainForm.UpdateLineCharPanel;
procedure TMainForm.AnyGridStartOperation(Sender: TBaseVirtualTree; OperationKind: TVTOperationKind);
// Display status message on long running sort operations
if not MainFormCreated then begin
// Do nothing before form is not ready to process messages, what OperationRunning silently does.
// See issue #665
if OperationKind = okSortTree then begin
ShowStatusMsg(_('Sorting grid nodes ...'));
FOperatingGrid := Sender;

0 comments on commit 0500f12

Please sign in to comment.
You can’t perform that action at this time.