Arch: Minor fixes

This commit is contained in:
Yorik van Havre
2012-07-18 15:04:56 -03:00
parent 401784d3d0
commit fe0ea018c6
4 changed files with 44 additions and 21 deletions

View File

@@ -3617,7 +3617,7 @@ class WireToBSpline(Modifier):
def finish(self):
Modifier.finish(self)
class SelectGroup():
"The SelectGroup FreeCAD command definition"
@@ -3634,7 +3634,14 @@ class SelectGroup():
def Activated(self):
sellist = []
for ob in Draft.getSelection():
sel = Draft.getSelection()
if len(sel) == 1:
if sel[0].isDerivedFrom("App::DocumentObjectGroup"):
cts = Draft.getGroupContents(FreeCADGui.Selection.getSelection())
for o in cts:
FreeCADGui.Selection.addSelection(o)
return
for ob in sel:
for child in ob.OutList:
FreeCADGui.Selection.addSelection(child)
for parent in ob.InList:
@@ -3642,7 +3649,7 @@ class SelectGroup():
for child in parent.OutList:
FreeCADGui.Selection.addSelection(child)
class Shape2DView():
"The Shape2DView FreeCAD command definition"
def GetResources(self):

View File

@@ -225,7 +225,7 @@ class DraftWorkbench (Workbench):
self.appendContextMenu("",self.lineList)
else:
if (FreeCADGui.Selection.getSelection()):
self.appendContextMenu("Display options",self.treecmdList)
self.appendContextMenu("Draft context tools",self.treecmdList)
def GetClassName(self):
return "Gui::PythonWorkbench"