Added support for PanelSheets.

This commit is contained in:
Markus Lampert
2017-06-21 11:41:35 -07:00
parent d5068ffc5c
commit fbb34347f8
2 changed files with 5 additions and 1 deletions
@@ -39,6 +39,9 @@
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select a template to be used for the job.&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;In case there are no templates you can create one through the popup menu of an existing job. Name the file job_*.xml and place it in the macro or the path directory (see preferences) in order to be selectable from this list.&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Note that the result is a plain xml file and can be edited by hand. Any properties not specified in the template will be set to their default value.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="3" column="0">
+2 -1
View File
@@ -22,6 +22,7 @@
# * *
# ***************************************************************************
import ArchPanel
import Draft
import FreeCAD
import Path
@@ -347,7 +348,7 @@ class DlgJobCreate:
else:
selected = None
index = 0
for solid in sorted(filter(lambda obj: hasattr(obj, 'Shape') and obj.Shape.isClosed(), FreeCAD.ActiveDocument.Objects), key=lambda o: o.Label):
for solid in sorted(filter(lambda obj: (hasattr(obj, 'Shape') and obj.Shape.isClosed()) or (hasattr(obj, 'Proxy') and isinstance(obj.Proxy, ArchPanel.PanelSheet)), FreeCAD.ActiveDocument.Objects), key=lambda o: o.Label):
if solid.Label == selected:
index = self.dialog.cbModel.count()
self.dialog.cbModel.addItem(solid.Label)