tvplanit: Add optional parameter "IsNewEvent" to VpDayView's and VpWeekView's EditSelectedEvent (issue #33854, modified patch by linux-man).

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6489 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2018-06-12 16:40:51 +00:00
parent 7b04d530a6
commit 947657a4ac
2 changed files with 6 additions and 6 deletions

View File

@ -439,7 +439,7 @@ type
procedure LoadLanguage; procedure LoadLanguage;
procedure LinkHandler(Sender: TComponent; NotificationType: TVpNotificationType; procedure LinkHandler(Sender: TComponent; NotificationType: TVpNotificationType;
const Value: Variant); override; const Value: Variant); override;
procedure EditSelectedEvent; procedure EditSelectedEvent(IsNewEvent: Boolean = false);
function GetControlType: TVpItemType; override; function GetControlType: TVpItemType; override;
procedure AutoScaledPaintToCanvas(PaintCanvas: TCanvas; PaintTo: TRect; procedure AutoScaledPaintToCanvas(PaintCanvas: TCanvas; PaintTo: TRect;
@ -2078,12 +2078,12 @@ begin
end; end;
{$ENDIF} {$ENDIF}
procedure TVpDayView.EditSelectedEvent; procedure TVpDayView.EditSelectedEvent(IsNewEvent: Boolean = false);
begin begin
if ReadOnly then if ReadOnly then
Exit; Exit;
if FActiveEvent <> nil then if FActiveEvent <> nil then
dvSpawnEventEditDialog(false); dvSpawnEventEditDialog(IsNewEvent);
end; end;
{=====} {=====}

View File

@ -260,7 +260,7 @@ type
procedure LinkHandler(Sender: TComponent; procedure LinkHandler(Sender: TComponent;
NotificationType: TVpNotificationType; const Value: Variant); override; NotificationType: TVpNotificationType; const Value: Variant); override;
function GetControlType: TVpItemType; override; function GetControlType: TVpItemType; override;
procedure EditSelectedEvent; procedure EditSelectedEvent(IsNewEvent: Boolean = false);
procedure PaintToCanvas(ACanvas: TCanvas; ARect: TRect; procedure PaintToCanvas(ACanvas: TCanvas; ARect: TRect;
Angle: TVpRotationAngle; ADate: TDateTime); Angle: TVpRotationAngle; ADate: TDateTime);
procedure RenderToCanvas(RenderCanvas: TCanvas; RenderIn: TRect; procedure RenderToCanvas(RenderCanvas: TCanvas; RenderIn: TRect;
@ -1254,10 +1254,10 @@ begin
end; end;
{=====} {=====}
procedure TVpWeekView.EditSelectedEvent; procedure TVpWeekView.EditSelectedEvent(IsNewEvent: Boolean = false);
begin begin
if ActiveEvent <> nil then if ActiveEvent <> nil then
wvSpawnEventEditDialog(false); wvSpawnEventEditDialog(IsNewEvent);
end; end;
{=====} {=====}