FEM: ResultMechanical add migration code f0r old result objects

Stats containing (min, avg, max) converted to (min, max)
Add Messagebox if histogram requested, but not available
This commit is contained in:
UR-0
2020-02-19 08:04:24 +01:00
committed by Bernd Hahnebach
parent 453370795b
commit e4cdb2fcc9
2 changed files with 16 additions and 2 deletions

View File

@@ -442,7 +442,13 @@ class _TaskPanelFemResultShow:
self.none_selected(True)
def show_histogram_clicked(self):
plt.show()
if len(plt.get_fignums()) > 0:
plt.show()
else:
QtGui.QMessageBox.information(None,
self.result_obj.Label + " - Information",
"No histogram available.\nPlease select a result type first."
)
def user_defined_text(self, equation):
FreeCAD.FEM_dialog["results_type"] = "user"