Merge remote-tracking branch 'upstream/main' into bim-cleanup-imports
This commit is contained in:
@@ -150,7 +150,10 @@ class BIM_Material:
|
||||
)
|
||||
buttonMergeDupes.setIcon(QtGui.QIcon(":/icons/view-refresh.svg"))
|
||||
createButtonsLayout.addWidget(buttonMergeDupes, 1, 0)
|
||||
self.dlg.buttonMergeDupes = buttonMergeDupes
|
||||
buttonMergeDupes.clicked.connect(self.onMergeDupes)
|
||||
if len(self.dlg.materials) < 2:
|
||||
buttonMergeDupes.setEnabled(False)
|
||||
|
||||
# delete unused
|
||||
buttonDeleteUnused = QtGui.QPushButton(
|
||||
@@ -208,20 +211,15 @@ class BIM_Material:
|
||||
first = True
|
||||
for mat in self.dlg.materials:
|
||||
orig = None
|
||||
for om in mats:
|
||||
if om.Label == mat.Label:
|
||||
orig = om
|
||||
break
|
||||
else:
|
||||
if (
|
||||
mat.Label[-1].isdigit()
|
||||
and mat.Label[-2].isdigit()
|
||||
and mat.Label[-3].isdigit()
|
||||
):
|
||||
for om in self.dlg.materials:
|
||||
if om.Label == mat.Label[:-3].strip():
|
||||
orig = om
|
||||
break
|
||||
if (
|
||||
mat.Label[-1].isdigit()
|
||||
and mat.Label[-2].isdigit()
|
||||
and mat.Label[-3].isdigit()
|
||||
):
|
||||
for om in self.dlg.materials:
|
||||
if om.Label == mat.Label[:-3].strip():
|
||||
orig = om
|
||||
break
|
||||
if orig:
|
||||
for par in mat.InList:
|
||||
for prop in par.PropertiesList:
|
||||
@@ -522,6 +520,9 @@ class BIM_Material:
|
||||
i.setFlags(i.flags() | QtCore.Qt.ItemIsEditable)
|
||||
if o.Name == name:
|
||||
self.dlg.matList.setCurrentItem(i)
|
||||
if hasattr(self.dlg, "buttonMergeDupes"):
|
||||
hasMultipleMaterials = len(self.dlg.materials) > 1
|
||||
self.dlg.buttonMergeDupes.setEnabled(hasMultipleMaterials)
|
||||
|
||||
def createIcon(self, obj):
|
||||
from PySide import QtCore, QtGui
|
||||
|
||||
@@ -144,6 +144,7 @@ class BIM_ProjectManager:
|
||||
import Draft
|
||||
import FreeCADGui
|
||||
import Part
|
||||
from draftutils import params
|
||||
|
||||
vaxes = []
|
||||
haxes = []
|
||||
@@ -306,8 +307,8 @@ class BIM_ProjectManager:
|
||||
outtext = Draft.make_text(
|
||||
[buildingname],
|
||||
FreeCAD.Vector(
|
||||
Draft.getParam("textheight", 0.20) * 0.3,
|
||||
-Draft.getParam("textheight", 0.20) * 1.43,
|
||||
params.get_param("textheight") * 0.3,
|
||||
-params.get_param("textheight") * 1.43,
|
||||
0,
|
||||
),
|
||||
)
|
||||
@@ -324,8 +325,8 @@ class BIM_ProjectManager:
|
||||
axisV.Label = translate("BIM", "Vertical Axes")
|
||||
axisV.ViewObject.BubblePosition = "Both"
|
||||
axisV.ViewObject.LineWidth = self.form.lineWidth.value()
|
||||
axisV.ViewObject.FontSize = Draft.getParam("textheight", 0.20)
|
||||
axisV.ViewObject.BubbleSize = Draft.getParam("textheight", 0.20) * 1.43
|
||||
axisV.ViewObject.FontSize = params.get_param("textheight")
|
||||
axisV.ViewObject.BubbleSize = params.get_param("textheight") * 1.43
|
||||
axisV.ViewObject.LineColor = color
|
||||
axisH = None
|
||||
if self.form.countHAxes.value() and distHAxes:
|
||||
@@ -336,8 +337,8 @@ class BIM_ProjectManager:
|
||||
axisH.ViewObject.BubblePosition = "Both"
|
||||
axisH.ViewObject.NumberingStyle = "A,B,C"
|
||||
axisH.ViewObject.LineWidth = self.form.lineWidth.value()
|
||||
axisH.ViewObject.FontSize = Draft.getParam("textheight", 0.20)
|
||||
axisH.ViewObject.BubbleSize = Draft.getParam("textheight", 0.20) * 1.43
|
||||
axisH.ViewObject.FontSize = params.get_param("textheight")
|
||||
axisH.ViewObject.BubbleSize = params.get_param("textheight") * 1.43
|
||||
axisH.Placement.Rotation = FreeCAD.Rotation(FreeCAD.Vector(0, 0, 1), 90)
|
||||
axisH.ViewObject.LineColor = color
|
||||
if axisV and axisH:
|
||||
|
||||
Reference in New Issue
Block a user