Sketcher: Reimplement strikethrough of inactive constraint labels
This commit is contained in:
@@ -936,6 +936,7 @@ Restart:
|
||||
asciiText->string = SbString(
|
||||
getPresentationString(Constr, "◠ ").toUtf8().constData()
|
||||
);
|
||||
asciiText->strikethrough = !Constr->isActive;
|
||||
|
||||
asciiText->pnts.setNum(3);
|
||||
SbVec3f* verts = asciiText->pnts.startEditing();
|
||||
@@ -958,6 +959,7 @@ Restart:
|
||||
|
||||
// Get presentation string (w/o units if option is set)
|
||||
asciiText->string = SbString(getPresentationString(Constr).toUtf8().constData());
|
||||
asciiText->strikethrough = !Constr->isActive;
|
||||
|
||||
if (Constr->Type == Distance) {
|
||||
asciiText->datumtype = SoDatumLabel::DISTANCE;
|
||||
@@ -1468,6 +1470,7 @@ Restart:
|
||||
sep->getChild(static_cast<int>(ConstraintNodePosition::DatumLabelIndex))
|
||||
);
|
||||
asciiText->string = SbString(getPresentationString(Constr).toUtf8().constData());
|
||||
asciiText->strikethrough = !Constr->isActive;
|
||||
asciiText->datumtype = SoDatumLabel::ANGLE;
|
||||
asciiText->param1 = distance;
|
||||
asciiText->param2 = startangle;
|
||||
@@ -1543,6 +1546,7 @@ Restart:
|
||||
asciiText->string = SbString(
|
||||
getPresentationString(Constr, "⌀").toUtf8().constData()
|
||||
);
|
||||
asciiText->strikethrough = !Constr->isActive;
|
||||
|
||||
asciiText->datumtype = SoDatumLabel::DIAMETER;
|
||||
asciiText->param1 = Constr->LabelDistance;
|
||||
@@ -1625,6 +1629,7 @@ Restart:
|
||||
asciiText->string = SbString(
|
||||
getPresentationString(Constr, "R").toUtf8().constData()
|
||||
);
|
||||
asciiText->strikethrough = !Constr->isActive;
|
||||
}
|
||||
|
||||
asciiText->datumtype = SoDatumLabel::RADIUS;
|
||||
@@ -2166,14 +2171,6 @@ QString EditModeConstraintCoinManager::getPresentationString(
|
||||
fixedValueStr = QStringLiteral("(") + fixedValueStr + QStringLiteral(")");
|
||||
}
|
||||
|
||||
if (!constraint->isActive) {
|
||||
QString result = QStringLiteral("\u0336");
|
||||
for (auto c : std::as_const(fixedValueStr)) {
|
||||
result += c + QStringLiteral("\u0336");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
return fixedValueStr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user