Skip to content

Commit

Permalink
FEM: Show error if results file is missing
Browse files Browse the repository at this point in the history
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
  • Loading branch information
PrzemoF committed Mar 16, 2015
1 parent 5b63606 commit 5ed9e81
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Mod/Fem/MechanicalAnalysis.py
Expand Up @@ -284,10 +284,13 @@ def calculixFinished(self,exitCode):
self.form.textEdit_Output.setText(self.OutStr)
self.form.label_Time.setText('Time: {0:4.1f}: '.format(time.time() - self.Start) )

QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
CalculixLib.importFrd(self.Basename + '.frd',FemGui.getActiveAnalysis() )
QApplication.restoreOverrideCursor()
self.OutStr = self.OutStr + '<font color="#0000FF">{0:4.1f}:</font> '.format(time.time() - self.Start) + '<font color="#00FF00">Loading results done!</font><br>'
if os.path.isfile(self.Basename + '.frd'):
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
CalculixLib.importFrd(self.Basename + '.frd',FemGui.getActiveAnalysis() )
QApplication.restoreOverrideCursor()
self.OutStr = self.OutStr + '<font color="#0000FF">{0:4.1f}:</font> '.format(time.time() - self.Start) + '<font color="#00FF00">Loading results done!</font><br>'
else:
self.OutStr = self.OutStr + '<font color="#0000FF">{0:4.1f}:</font> '.format(time.time() - self.Start) + '<font color="#FF0000">Loading results failed! Results file doesn\'t exist</font><br>'
self.form.textEdit_Output.setText(self.OutStr)
self.form.label_Time.setText('Time: {0:4.1f}: '.format(time.time() - self.Start) )

Expand Down

0 comments on commit 5ed9e81

Please sign in to comment.