tvplanit: Fix occasional crash of application when alarmdlg is shown. Issue #39043.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8550 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2022-10-13 10:28:16 +00:00
parent 885da797ae
commit 72217cba80
5 changed files with 10 additions and 12 deletions

View File

@ -198,7 +198,7 @@ object Form1: TForm1
HiddenCategories.BackgroundColor = clSilver HiddenCategories.BackgroundColor = clSilver
HiddenCategories.Color = clGray HiddenCategories.Color = clGray
AutoConnect = True AutoConnect = True
FileName = 'file error.ini' FileName = 'data.ini'
Left = 184 Left = 184
Top = 272 Top = 272
end end

View File

@ -6,7 +6,8 @@ interface
uses uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls,
Spin, PrintersDlgs, VpBaseDS, VpIniDs, VpDayView, VpPrtPrvDlg, VpPrtFmtCBox, VpData; Spin, PrintersDlgs, VpBaseDS, VpIniDs, VpDayView, VpPrtPrvDlg, VpPrtFmtCBox,
VpData;
type type

View File

@ -15,8 +15,6 @@ object AlarmNotifyForm: TAlarmNotifyForm
OnCreate = FormCreate OnCreate = FormCreate
OnKeyDown = FormKeyDown OnKeyDown = FormKeyDown
OnShow = FormShow OnShow = FormShow
Position = poDefault
LCLVersion = '2.3.0.0'
object SnoozeCaption: TLabel object SnoozeCaption: TLabel
AnchorSideLeft.Control = lTime AnchorSideLeft.Control = lTime
AnchorSideTop.Control = Bevel1 AnchorSideTop.Control = Bevel1
@ -56,7 +54,7 @@ object AlarmNotifyForm: TAlarmNotifyForm
Left = 8 Left = 8
Height = 15 Height = 15
Top = 8 Top = 8
Width = 30 Width = 29
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Top = 8 BorderSpacing.Top = 8
Caption = 'lTime' Caption = 'lTime'
@ -184,7 +182,7 @@ object AlarmNotifyForm: TAlarmNotifyForm
Shape = bsTopLine Shape = bsTopLine
end end
object EventDialog: TVpEventEditDialog object EventDialog: TVpEventEditDialog
Version = 'v1.12' Version = 'v1.0.7'
TimeFormat = tf24Hour TimeFormat = tf24Hour
Options = [] Options = []
Placement.Position = mpCenterTop Placement.Position = mpCenterTop

View File

@ -89,7 +89,7 @@ type
published published
{properties} {properties}
property BackgroundColor: TColor property BackgroundColor: TColor
read FBGColor write FBGColor default clInfoBk; read FBGColor write FBGColor default clWindow;
property DataStore; property DataStore;
property Placement; property Placement;
end; end;
@ -123,7 +123,7 @@ var
AlarmNotifyForm: TAlarmNotifyForm; AlarmNotifyForm: TAlarmNotifyForm;
begin begin
if (Event <> nil) and (not Event.AlertDisplayed) then begin if (Event <> nil) and (not Event.AlertDisplayed) then begin
AlarmNotifyForm := TAlarmNotifyForm.Create(Self); AlarmNotifyForm := TAlarmNotifyForm.Create(nil);
try try
try try
Event.AlertDisplayed := true; Event.AlertDisplayed := true;

View File

@ -184,12 +184,11 @@ begin
else else
Form.BorderStyle:= bsDialog; Form.BorderStyle:= bsDialog;
if (Screen.ActiveForm <> nil) if (Screen.ActiveForm <> nil) and (Screen.ActiveForm.FormStyle = fsStayOnTop) then
and (Screen.ActiveForm.FormStyle = fsStayOnTop) then
Form.FormStyle := fsStayOnTop; Form.FormStyle := fsStayOnTop;
// Form.Height := FPlacement.Height; //Form.Height := FPlacement.Height;
// Form.Width := FPlacement.Width; //Form.Width := FPlacement.Width;
{set position} {set position}
case FPlacement.Position of case FPlacement.Position of