Skip to content

Commit

Permalink
MeasureGui: Show delta symbol in front of component dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
hlorus authored and chennes committed Jul 1, 2024
1 parent a131656 commit 6257fe2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Mod/Measure/Gui/ViewProviderMeasureDistance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 6257fe2

Please sign in to comment.