FEM: small code change to get lgtm quit
This commit is contained in:
@@ -222,20 +222,22 @@ class _TaskPanel:
|
|||||||
QApplication.restoreOverrideCursor()
|
QApplication.restoreOverrideCursor()
|
||||||
|
|
||||||
def get_active_analysis(self):
|
def get_active_analysis(self):
|
||||||
self.analysis = FemGui.getActiveAnalysis()
|
analysis = FemGui.getActiveAnalysis()
|
||||||
if self.analysis:
|
if not analysis:
|
||||||
for m in FemGui.getActiveAnalysis().Group:
|
FreeCAD.Console.PrintLog("No active analysis, means no group meshing.\n")
|
||||||
|
self.analysis = None # no group meshing
|
||||||
|
else:
|
||||||
|
for m in analysis.Group:
|
||||||
if m.Name == self.mesh_obj.Name:
|
if m.Name == self.mesh_obj.Name:
|
||||||
FreeCAD.Console.PrintMessage(
|
FreeCAD.Console.PrintMessage(
|
||||||
"Active analysis found: {}\n"
|
"Active analysis found: {}\n"
|
||||||
.format(self.analysis.Name)
|
.format(self.analysis.Name)
|
||||||
)
|
)
|
||||||
return
|
self.analysis = analysis # group meshing
|
||||||
|
break
|
||||||
else:
|
else:
|
||||||
FreeCAD.Console.PrintLog(
|
FreeCAD.Console.PrintLog(
|
||||||
"Mesh is not member of active analysis, means no group meshing.\n"
|
"Mesh is not member of active analysis, means no group meshing.\n"
|
||||||
)
|
)
|
||||||
self.analysis = None # no group meshing
|
self.analysis = None # no group meshing
|
||||||
else:
|
return
|
||||||
FreeCAD.Console.PrintLog("No active analysis, means no group meshing.\n")
|
|
||||||
self.analysis = None # no group meshing
|
|
||||||
|
|||||||
Reference in New Issue
Block a user