mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix bug where you couldn't delete non active task columns
This commit is contained in:
@@ -1941,10 +1941,11 @@ class RemoveTaskColumn(bpy.types.Operator):
|
||||
bl_idname = "bim.remove_task_column"
|
||||
bl_label = "Remove Task Column"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
name: bpy.props.StringProperty()
|
||||
|
||||
def execute(self, context):
|
||||
self.props = context.scene.BIMWorkScheduleProperties
|
||||
self.props.columns.remove(self.props.active_column_index)
|
||||
self.props.columns.remove(self.props.columns.find(self.name))
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@ class BIM_UL_task_columns(UIList):
|
||||
row.prop(item, "name", emboss=False, text="")
|
||||
if props.sort_column == item.name:
|
||||
row.label(text="", icon="SORTALPHA")
|
||||
row.operator("bim.remove_task_column", text="", icon="X")
|
||||
row.operator("bim.remove_task_column", text="", icon="X").name = item.name
|
||||
|
||||
|
||||
class BIM_UL_tasks(UIList):
|
||||
|
||||
Reference in New Issue
Block a user