From 406953704f16e8ac2c592e34792e8518dca5b10d Mon Sep 17 00:00:00 2001 From: 2mik Date: Mon, 19 Mar 2018 20:27:52 +0300 Subject: [PATCH] ScadaData: fix formatter --- ScadaData/ScadaData/Client/DataFormatter.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ScadaData/ScadaData/Client/DataFormatter.cs b/ScadaData/ScadaData/Client/DataFormatter.cs index 066118a80..ebd158165 100644 --- a/ScadaData/ScadaData/Client/DataFormatter.cs +++ b/ScadaData/ScadaData/Client/DataFormatter.cs @@ -174,12 +174,13 @@ public void FormatCnlVal(double val, int stat, InCnlProps cnlProps, string decSe // определение формата числа NumberFormatInfo nfi; + bool sepDefined = !(decSep == null && grSep == null); - if (cnlPropsIsNull) + if (cnlPropsIsNull || sepDefined) { - nfi = decSep == null && grSep == null ? - defNfi : - CreateFormatInfo(DefDecDig, decSep, grSep); + nfi = sepDefined ? + CreateFormatInfo(DefDecDig, decSep, grSep) : + defNfi; } else if (cnlProps.FormatInfo == null) {