Skip to content

Commit bf4108f

Browse files
committed
ok maybe labelsTempReset is enough and we do not need to replace all double labels by Label after all
1 parent 9d909d5 commit bf4108f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

CommonData/column.cpp

+11-1
Original file line numberDiff line numberDiff line change
@@ -1817,8 +1817,18 @@ void Column::labelsOrderByValue(bool doDbUpdateEtc)
18171817
{
18181818
JASPTIMER_SCOPE(Column::labelsOrderByValue);
18191819

1820+
bool replaceAllDoubles = false;
18201821
static double dummy;
1821-
replaceDoublesTillLabelsRowWithLabels(labelsTempCount());
1822+
1823+
for(Label * label : labels())
1824+
if(!label->isEmptyValue() && !(label->originalValue().isDouble() || ColumnUtils::getDoubleValue(label->originalValueAsString(), dummy)))
1825+
{
1826+
replaceAllDoubles = true;
1827+
break;
1828+
}
1829+
1830+
if(replaceAllDoubles)
1831+
replaceDoublesTillLabelsRowWithLabels(labelsTempCount());
18221832

18231833
doublevec asc = valuesNumericOrdered();
18241834
auto alpha = valuesAlphabeticalOffsets();

0 commit comments

Comments
 (0)