From b839d15d7b680f47190df809e126232e2259427c Mon Sep 17 00:00:00 2001 From: alexs75 Date: Thu, 16 Oct 2014 11:46:48 +0000 Subject: [PATCH] RxCurrencyEdit - display edit empty value for 0 if ZeroEmpty=true git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3662 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/rx/trunk/curredit.pas | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/components/rx/trunk/curredit.pas b/components/rx/trunk/curredit.pas index abb639356..5f74c14ec 100644 --- a/components/rx/trunk/curredit.pas +++ b/components/rx/trunk/curredit.pas @@ -291,7 +291,10 @@ end; function TCustomNumEdit.GetText: string; begin - Result := FloatToStr(FValue); + if (FValue = 0) and FZeroEmpty then + Result:='' + else + Result := FloatToStr(FValue); end; function TCustomNumEdit.GetValue: Extended; @@ -448,10 +451,6 @@ begin exit; FFocusedDisplay := true; Reset; -{ if WidgetSet.GetLCLCapability(lcReceivesLMClearCutCopyPasteReliably) = LCL_CAPABILITY_YES then - FDataLink.Reset - else - FDataLink.Edit;} end; procedure TCustomNumEdit.WMKillFocus(var Message: TLMKillFocus);