MeasureGui: Show delta symbol in front of component dimensions

This commit is contained in:
hlorus
2024-06-28 18:14:04 +02:00
committed by Chris Hennes
parent a9adc5c24b
commit 600f44484d

View File

@@ -450,13 +450,16 @@ void ViewProviderMeasureDistance::redrawAnnotation()
// Set delta distance
auto propDistanceX = static_cast<App::PropertyDistance*>(getMeasureObject()->getPropertyByName("DistanceX"));
static_cast<DimensionLinear*>(pDeltaDimensionSwitch->getChild(0))->text.setValue(propDistanceX->getQuantityValue().getUserString().toUtf8());
static_cast<DimensionLinear*>(pDeltaDimensionSwitch->getChild(0))
->text.setValue("Δx " + propDistanceX->getQuantityValue().getUserString().toUtf8());
auto propDistanceY = static_cast<App::PropertyDistance*>(getMeasureObject()->getPropertyByName("DistanceY"));
static_cast<DimensionLinear*>(pDeltaDimensionSwitch->getChild(1))->text.setValue(propDistanceY->getQuantityValue().getUserString().toUtf8());
static_cast<DimensionLinear*>(pDeltaDimensionSwitch->getChild(1))
->text.setValue("Δy " + propDistanceY->getQuantityValue().getUserString().toUtf8());
auto propDistanceZ = static_cast<App::PropertyDistance*>(getMeasureObject()->getPropertyByName("DistanceZ"));
static_cast<DimensionLinear*>(pDeltaDimensionSwitch->getChild(2))->text.setValue(propDistanceZ->getQuantityValue().getUserString().toUtf8());
static_cast<DimensionLinear*>(pDeltaDimensionSwitch->getChild(2))
->text.setValue("Δz " + propDistanceZ->getQuantityValue().getUserString().toUtf8());
// Set matrix
SbMatrix matrix = getMatrix();