mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 22:11:36 +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_idname = "bim.remove_task_column"
|
||||||
bl_label = "Remove Task Column"
|
bl_label = "Remove Task Column"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
name: bpy.props.StringProperty()
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
self.props = context.scene.BIMWorkScheduleProperties
|
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"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ class BIM_UL_task_columns(UIList):
|
|||||||
row.prop(item, "name", emboss=False, text="")
|
row.prop(item, "name", emboss=False, text="")
|
||||||
if props.sort_column == item.name:
|
if props.sort_column == item.name:
|
||||||
row.label(text="", icon="SORTALPHA")
|
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):
|
class BIM_UL_tasks(UIList):
|
||||||
|
|||||||
Reference in New Issue
Block a user