FEM: Don't import FemGui when it's not required
This is part of preparation to create automated FEM wb tests Signed-off-by: Przemo Firszt <przemo@firszt.eu>
This commit is contained in:
parent
ddac5eed60
commit
f5ad8ca415
|
@ -22,7 +22,6 @@
|
|||
|
||||
|
||||
import FreeCAD
|
||||
import FemGui
|
||||
from PySide import QtCore
|
||||
|
||||
|
||||
|
@ -37,6 +36,7 @@ class FemTools(QtCore.QRunnable, QtCore.QObject):
|
|||
if analysis:
|
||||
self.analysis = analysis
|
||||
else:
|
||||
import FemGui
|
||||
self.analysis = FemGui.getActiveAnalysis()
|
||||
if self.analysis:
|
||||
self.update_objects()
|
||||
|
|
|
@ -23,12 +23,12 @@
|
|||
import ccxFrdReader
|
||||
import FreeCAD
|
||||
from FemTools import FemTools
|
||||
import FemGui
|
||||
import os
|
||||
import time
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
import FreeCADGui
|
||||
import FemGui
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide.QtCore import Qt
|
||||
from PySide.QtGui import QApplication
|
||||
|
@ -79,7 +79,6 @@ class _CommandNewMechanicalAnalysis:
|
|||
FreeCADGui.Selection.clearSelection()
|
||||
|
||||
def IsActive(self):
|
||||
import FemGui
|
||||
return FreeCADGui.ActiveDocument is not None and FemGui.getActiveAnalysis() is None
|
||||
|
||||
|
||||
|
@ -649,6 +648,7 @@ def results_present():
|
|||
return results
|
||||
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
FreeCADGui.addCommand('Fem_NewMechanicalAnalysis', _CommandNewMechanicalAnalysis())
|
||||
FreeCADGui.addCommand('Fem_CreateFromShape', _CommandFemFromShape())
|
||||
FreeCADGui.addCommand('Fem_MechanicalJobControl', _CommandMechanicalJobControl())
|
||||
|
|
Loading…
Reference in New Issue
Block a user