mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 23:19:30 +02:00
DateTimePicker - check selection update on changing DateDisplayOrder
git-svn-id: trunk@52056 -
This commit is contained in:
parent
db7cf0af86
commit
7ea0992229
@ -250,6 +250,7 @@ type
|
|||||||
procedure SetHMSMs(const AValue: THMSMs);
|
procedure SetHMSMs(const AValue: THMSMs);
|
||||||
procedure UpdateIfUserChangedText;
|
procedure UpdateIfUserChangedText;
|
||||||
function GetSelectedText: String;
|
function GetSelectedText: String;
|
||||||
|
procedure AdjustSelection;
|
||||||
procedure AdjustEffectiveCenturyFrom;
|
procedure AdjustEffectiveCenturyFrom;
|
||||||
procedure AdjustEffectiveDateDisplayOrder;
|
procedure AdjustEffectiveDateDisplayOrder;
|
||||||
procedure AdjustEffectiveHideDateTimeParts;
|
procedure AdjustEffectiveHideDateTimeParts;
|
||||||
@ -913,8 +914,10 @@ begin
|
|||||||
PreviousEffectiveDDO := FEffectiveDateDisplayOrder;
|
PreviousEffectiveDDO := FEffectiveDateDisplayOrder;
|
||||||
FDateDisplayOrder := AValue;
|
FDateDisplayOrder := AValue;
|
||||||
AdjustEffectiveDateDisplayOrder;
|
AdjustEffectiveDateDisplayOrder;
|
||||||
if FEffectiveDateDisplayOrder <> PreviousEffectiveDDO then
|
if FEffectiveDateDisplayOrder <> PreviousEffectiveDDO then begin
|
||||||
|
AdjustSelection;
|
||||||
UpdateDate;
|
UpdateDate;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1652,6 +1655,13 @@ begin
|
|||||||
Result := FTimeText[TDateTimePart(FSelectedTextPart - 1)];
|
Result := FTimeText[TDateTimePart(FSelectedTextPart - 1)];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomDateTimePicker.AdjustSelection;
|
||||||
|
begin
|
||||||
|
if GetDateTimePartFromTextPart(FSelectedTextPart) in
|
||||||
|
FEffectiveHideDateTimeParts then
|
||||||
|
MoveSelectionLR(False);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomDateTimePicker.AdjustEffectiveCenturyFrom;
|
procedure TCustomDateTimePicker.AdjustEffectiveCenturyFrom;
|
||||||
var
|
var
|
||||||
Y1, Y2, M, D: Word;
|
Y1, Y2, M, D: Word;
|
||||||
@ -1830,10 +1840,7 @@ begin
|
|||||||
|
|
||||||
if FEffectiveHideDateTimeParts
|
if FEffectiveHideDateTimeParts
|
||||||
<> PreviousEffectiveHideDateTimeParts then begin
|
<> PreviousEffectiveHideDateTimeParts then begin
|
||||||
if GetDateTimePartFromTextPart(FSelectedTextPart) in
|
AdjustSelection;
|
||||||
FEffectiveHideDateTimeParts then
|
|
||||||
MoveSelectionLR(False);
|
|
||||||
|
|
||||||
FRecalculatingTextSizesNeeded := True;
|
FRecalculatingTextSizesNeeded := True;
|
||||||
UpdateShowArrowButton;
|
UpdateShowArrowButton;
|
||||||
UpdateDate;
|
UpdateDate;
|
||||||
|
Loading…
Reference in New Issue
Block a user