You've already forked lazarus-ccr
tvplanit: Fix Lazarus crashing if datastore is deleted from a form containing a MonthView.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5120 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -376,13 +376,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
RenderCanvas.Font.Color := RealSelDayColor;
|
RenderCanvas.Font.Color := RealSelDayColor;
|
||||||
RenderCanvas.Font.Style := FMonthView.DayNumberFont.Style + [fsBold];
|
RenderCanvas.Font.Style := FMonthView.DayNumberFont.Style + [fsBold];
|
||||||
if (FMonthView.EventDayStyle <> []) and (FMonthView.DataStore.Resource <> nil) and
|
if (FMonthView.EventDayStyle <> []) and (FMonthView.Datastore <> nil) and
|
||||||
|
(FMonthView.DataStore.Resource <> nil) and
|
||||||
(FMonthView.DataStore.Resource.Schedule.EventCountByDay(ThisDate) > 0)
|
(FMonthView.DataStore.Resource.Schedule.EventCountByDay(ThisDate) > 0)
|
||||||
then
|
then
|
||||||
RenderCanvas.Font.Style := RenderCanvas.Font.Style + FMonthView.EventDayStyle;
|
RenderCanvas.Font.Style := RenderCanvas.Font.Style + FMonthView.EventDayStyle;
|
||||||
end else begin
|
end else begin
|
||||||
{ Set the font style for days which have events. }
|
{ Set the font style for days which have events. }
|
||||||
if (FMonthView.EventDayStyle <> []) and (FMonthView.DataStore.Resource <> nil) and
|
if (FMonthView.EventDayStyle <> []) and (FMonthview.Datastore <> nil) and
|
||||||
|
(FMonthView.DataStore.Resource <> nil) and
|
||||||
(FMonthView.DataStore.Resource.Schedule.EventCountByDay(ThisDate) > 0)
|
(FMonthView.DataStore.Resource.Schedule.EventCountByDay(ThisDate) > 0)
|
||||||
then
|
then
|
||||||
RenderCanvas.Font.Style := RenderCanvas.Font.Style + FMonthView.EventDayStyle
|
RenderCanvas.Font.Style := RenderCanvas.Font.Style + FMonthView.EventDayStyle
|
||||||
@ -484,13 +486,15 @@ begin
|
|||||||
DrawFocusRect(TextRect);
|
DrawFocusRect(TextRect);
|
||||||
RenderCanvas.Font.Color := RealSelDayColor;
|
RenderCanvas.Font.Color := RealSelDayColor;
|
||||||
RenderCanvas.Font.Style := FMonthView.DayNumberFont.Style + [fsBold];
|
RenderCanvas.Font.Style := FMonthView.DayNumberFont.Style + [fsBold];
|
||||||
if (FMonthView.EventDayStyle <> []) and (FMonthView.DataStore.Resource <> nil) and
|
if (FMonthView.EventDayStyle <> []) and (FMonthview.Datastore <> nil) and
|
||||||
|
(FMonthView.DataStore.Resource <> nil) and
|
||||||
(FMonthView.DataStore.Resource.Schedule.EventCountByDay(ThisDate) > 0)
|
(FMonthView.DataStore.Resource.Schedule.EventCountByDay(ThisDate) > 0)
|
||||||
then
|
then
|
||||||
RenderCanvas.Font.Style := RenderCanvas.Font.Style + FMonthView.EventDayStyle;
|
RenderCanvas.Font.Style := RenderCanvas.Font.Style + FMonthView.EventDayStyle;
|
||||||
end else begin
|
end else begin
|
||||||
{ Set the font style for days which have events. }
|
{ Set the font style for days which have events. }
|
||||||
if (FMonthView.EventDayStyle <> []) and (FMonthView.DataStore.Resource <> nil) and
|
if (FMonthView.EventDayStyle <> []) and (FMonthView.Datastore <> nil) and
|
||||||
|
(FMonthView.DataStore.Resource <> nil) and
|
||||||
(FMonthView.DataStore.Resource.Schedule.EventCountByDay(ThisDate) > 0)
|
(FMonthView.DataStore.Resource.Schedule.EventCountByDay(ThisDate) > 0)
|
||||||
then
|
then
|
||||||
RenderCanvas.Font.Style := RenderCanvas.Font.Style + FMonthView.EventDayStyle
|
RenderCanvas.Font.Style := RenderCanvas.Font.Style + FMonthView.EventDayStyle
|
||||||
|
Reference in New Issue
Block a user