mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-30 12:09:51 +00:00
Reuse props.active_group
This commit is contained in:
@@ -661,10 +661,7 @@ class BIM_PT_group_qtos(Panel):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
props = tool.Blender.get_group_props()
|
props = tool.Blender.get_group_props()
|
||||||
total_resources = len(props.groups)
|
return bool(props.active_group)
|
||||||
if total_resources > 0 and props.active_group_index < total_resources:
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
if not GroupQtosData.is_loaded:
|
if not GroupQtosData.is_loaded:
|
||||||
@@ -696,10 +693,7 @@ class BIM_PT_group_psets(Panel):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
props = tool.Blender.get_group_props()
|
props = tool.Blender.get_group_props()
|
||||||
total_resources = len(props.groups)
|
return bool(props.active_group)
|
||||||
if total_resources > 0 and props.active_group_index < total_resources:
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
if not GroupPsetData.is_loaded:
|
if not GroupPsetData.is_loaded:
|
||||||
|
|||||||
Reference in New Issue
Block a user