From 28f337df41686f5456c60f63297bc57d931368ff Mon Sep 17 00:00:00 2001 From: zoran-vucenovic Date: Sun, 27 Jan 2013 11:25:55 +0000 Subject: [PATCH] Fixed up-down arrows firing OnChange event git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2638 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../ZVDateTimeCtrls/trunk/zvdatetimepicker.pas | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/components/ZVDateTimeCtrls/trunk/zvdatetimepicker.pas b/components/ZVDateTimeCtrls/trunk/zvdatetimepicker.pas index 8c05d7856..cb599463d 100644 --- a/components/ZVDateTimeCtrls/trunk/zvdatetimepicker.pas +++ b/components/ZVDateTimeCtrls/trunk/zvdatetimepicker.pas @@ -2822,10 +2822,15 @@ begin SetFocusIfPossible; if not FReadOnly then begin - if Button = btNext then - IncreaseCurrentTextPart - else - DecreaseCurrentTextPart; + Inc(FUserChanging); + try + if Button = btNext then + IncreaseCurrentTextPart + else + DecreaseCurrentTextPart; + finally + Dec(FUserChanging); + end; end; end;