mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 20:42:27 +00:00
disable adding cost schedule columns with an empty name
example - https://i.imgur.com/5lGdI2X.png
This commit is contained in:
@@ -533,6 +533,13 @@ class AddCostColumn(bpy.types.Operator):
|
|||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
name: bpy.props.StringProperty()
|
name: bpy.props.StringProperty()
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def poll(cls, context):
|
||||||
|
if not context.scene.BIMCostProperties.cost_column:
|
||||||
|
cls.poll_message_set("Cost column name is empty")
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
core.add_cost_column(tool.Cost, self.name)
|
core.add_cost_column(tool.Cost, self.name)
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|||||||
Reference in New Issue
Block a user