tvplanit: Fix Event editor erasing event if created from MonthView and if closed by the form's "x" button.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5992 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
c79ae662d4
commit
6723411283
@ -722,6 +722,7 @@ begin
|
||||
DataStore.PostEvents;
|
||||
Invalidate;
|
||||
end;
|
||||
mvActiveEvent := nil;
|
||||
end;
|
||||
|
||||
procedure TVpMonthView.mvSpinButtonClick(Sender: TObject; Button: TUDBtnType);
|
||||
@ -1035,6 +1036,7 @@ procedure TVpMonthView.WMLButtonDblClick(var Msg: TLMLButtonDblClk);
|
||||
{$ENDIF}
|
||||
var
|
||||
startTime, endTime: TDateTime;
|
||||
newevent: Boolean;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -1055,9 +1057,10 @@ begin
|
||||
if SelectEventAtCoord(Point(Msg.XPos, Msg.YPos)) then
|
||||
FOnEventDblClick(self, mvActiveEvent);
|
||||
end else
|
||||
if mvActiveEvent <> nil then
|
||||
mvSpawnEventEditDialog(SelectEventAtCoord(Point(Msg.XPos, Msg.YPos)))
|
||||
else
|
||||
if mvActiveEvent <> nil then begin
|
||||
newevent := not SelectEventAtCoord(Point(Msg.XPos, Msg.YPos));
|
||||
mvSpawnEventEditDialog(newevent);
|
||||
end else
|
||||
if (DataStore.Resource <> nil) then begin
|
||||
{ otherwise, we must want to create a new event }
|
||||
startTime := trunc(Date) + 0.5; { default to 12:00 noon }
|
||||
|
Loading…
Reference in New Issue
Block a user