Improve error message for empty transformed features

This commit is contained in:
Krrish777
2025-12-31 23:39:35 +05:30
committed by Max Wilfinger
parent 4a0aff4c95
commit c7c39f27eb

View File

@@ -103,7 +103,15 @@ Part::Feature* Transformed::getBaseObject(bool silent) const
}
}
else {
err = QT_TRANSLATE_NOOP("Exception", "No originals linked to the transformed feature.");
if (freecad_cast<const Mirrored*>(this)) {
err = QT_TRANSLATE_NOOP("Exception", "No features selected to be mirrored.");
}
else if (freecad_cast<const LinearPattern*>(this) || freecad_cast<const PolarPattern*>(this)) {
err = QT_TRANSLATE_NOOP("Exception", "No features selected to be patterned.");
}
else {
err = QT_TRANSLATE_NOOP("Exception", "No features selected to be transformed.");
}
}
if (!silent && err) {