mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 15:49:33 +02:00
Reverted revision(s) 51695 #3d71055636 from trunk:
LCL: Try not to close CalendarDialogs if CurrentView <> cvMonth. Partly resolves Issue #0029646. git-svn-id: branches/fixes_1_6@52131 -
This commit is contained in:
parent
c13737ca00
commit
6dd860fd79
@ -667,12 +667,9 @@ procedure TCalendarDialog.CalendarDblClick(Sender: TObject);
|
||||
var
|
||||
CalendarForm: TForm;
|
||||
P: TPoint;
|
||||
htRes: TCalendarPart;
|
||||
begin
|
||||
P := FCalendar.ScreenToClient(Mouse.CursorPos);
|
||||
//if FCalendar.HitTest(P) in [cpNoWhere, cpDate] then
|
||||
htRes := FCalendar.HitTest(P);
|
||||
if {(htRes = cpNoWhere) or }((htRes = cpDate) and (FCalendar.GetCalendarView = cvMonth)) then
|
||||
if FCalendar.HitTest(P) in [cpNoWhere, cpDate] then
|
||||
begin
|
||||
GetNewDate(Sender);
|
||||
CalendarForm:=TForm(TComponent(Sender).Owner);
|
||||
|
@ -85,11 +85,9 @@ end;
|
||||
procedure TCalendarPopupForm.CalendarDblClick(Sender: TObject);
|
||||
var
|
||||
P: TPoint;
|
||||
htRes: TCalendarPart;
|
||||
begin
|
||||
P := Calendar.ScreenToClient(Mouse.CursorPos);
|
||||
htRes := Calendar.HitTest(P);
|
||||
if {(htRes = cpNoWhere) or }((htRes = cpDate) and (Calendar.GetCalendarView = cvMonth)) then
|
||||
if Calendar.HitTest(P) in [cpNoWhere, cpDate] then
|
||||
ReturnDate;
|
||||
end;
|
||||
|
||||
@ -105,10 +103,7 @@ begin
|
||||
VK_ESCAPE:
|
||||
Close;
|
||||
VK_RETURN, VK_SPACE:
|
||||
if (Calendar.GetCalendarView = cvMonth) then
|
||||
ReturnDate
|
||||
else
|
||||
Handled := False;
|
||||
ReturnDate;
|
||||
else
|
||||
Handled := false;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user