Remove magic numbers and hard type enums in DimensionFormatter.h.h
- Remove currently present magic numbers - Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.
This commit is contained in:
committed by
WandererFan
parent
97b34f9c57
commit
c53679422b
@@ -1981,9 +1981,10 @@ void CmdTechDrawExtensionArcLengthAnnotation::activated(int iMsg)
|
||||
|
||||
// Use virtual dimension view helper to format resulting value
|
||||
TechDraw::DrawViewDimension helperDim;
|
||||
using Format = DimensionFormatter::Format;
|
||||
std::string valueStr = helperDim.formatValue(totalLength,
|
||||
QString::fromUtf8(helperDim.FormatSpec.getStrValue().data()),
|
||||
helperDim.isMultiValueSchema() ? 0 : 1);
|
||||
helperDim.isMultiValueSchema() ? Format::UNALTERED : Format::FORMATTED);
|
||||
balloon->Text.setValue("◠ " + valueStr);
|
||||
|
||||
// Set balloon format to be referencing dimension-like
|
||||
|
||||
Reference in New Issue
Block a user