This repository was archived by the owner on Nov 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
src/blenderbim/blenderbim/bim/module/spatial Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ def update_elevation(self, context):
4444
4545
4646def update_active_container_index (self , context ):
47+ if self .active_container_index < 0 :
48+ return
4749 self .active_container_id = self .containers [self .active_container_index ].ifc_definition_id
4850 self .container_name = self .containers [self .active_container_index ].name
4951 self .elevation = self .containers [self .active_container_index ].elevation
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ def draw(self, context):
116116 self .props = context .scene .BIMSpatialManagerProperties
117117 row = self .layout .row ()
118118 row .operator ("bim.load_container_manager" , icon = "FILE_REFRESH" , text = "Load Spatial Structure" )
119- if self .props .active_container_index < len (self .props .containers ):
119+ if 0 <= self .props .active_container_index < len (self .props .containers ):
120120 ifc_definition_id = self .props .containers [self .props .active_container_index ].ifc_definition_id
121121 row = self .layout .row ()
122122 row .alignment = "RIGHT"
@@ -134,7 +134,7 @@ def draw(self, context):
134134 "active_container_index" ,
135135 )
136136 row = self .layout .row ()
137- if self .props .active_container_index < len (self .props .containers ):
137+ if 0 <= self .props .active_container_index < len (self .props .containers ):
138138 row .prop (self .props , "container_name" , text = "" )
139139 row .prop (self .props , "elevation" , text = "" )
140140 op = row .operator ("bim.edit_container_attributes" , icon = "CHECKMARK" , text = "Apply" )
You can’t perform that action at this time.
0 commit comments