diff --git a/src/Mod/Fem/Gui/TaskPostBoxes.cpp b/src/Mod/Fem/Gui/TaskPostBoxes.cpp index 62dcf2af2c..4e333f5e76 100644 --- a/src/Mod/Fem/Gui/TaskPostBoxes.cpp +++ b/src/Mod/Fem/Gui/TaskPostBoxes.cpp @@ -1099,15 +1099,24 @@ void TaskPostDataAtPoint::on_Field_activated(int i) { return; } static_cast(getObject())->FieldName.setValue(FieldName); - if ((FieldName == "von Mises Stress") || (FieldName == "Tresca Stress") + + // Set the unit for the different known result types. + // For the Elmer EigenModes, the names are different and unique. For them we only check + // the beginning of the name. + + if ( (FieldName == "von Mises Stress") || (FieldName == "Tresca Stress") || (FieldName == "Major Principal Stress") || (FieldName == "Intermediate Principal Stress") || (FieldName == "Minor Principal Stress") || (FieldName == "Stress xx component") || (FieldName == "Stress xy component") || (FieldName == "Stress xz component") || (FieldName == "Stress yy component") - || (FieldName == "Stress yz component") || (FieldName == "Stress zz component")) { + || (FieldName == "Stress yz component") || (FieldName == "Stress zz component") + || (FieldName.find("tresca Eigen", 0) == 0) || (FieldName.find("vonmises Eigen", 0) == 0) + || (FieldName.find("stress_", 0) == 0) + || (FieldName.find("principal stress Eigen", 0) == 0) ) { static_cast(getObject())->Unit.setValue("Pa"); } - else if ((FieldName == "Displacement") || (FieldName == "Displacement Magnitude")) { + else if ( (FieldName == "Displacement") || (FieldName == "Displacement Magnitude") + || (FieldName.find("displacement Eigen", 0) == 0) ) { static_cast(getObject())->Unit.setValue("m"); } else if (FieldName == "Temperature") {