mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Spatial Manager - try to preserve the selection on loading the manager
Also noticed in Sigma Dimensions video that every time user deletes a storey or applies new elevation the selection was jumping to the first storey. Now it's going to be more natural. Before - https://imgur.com/a/gbn7ryQ After - https://imgur.com/a/QX2RulF
This commit is contained in:
@@ -198,6 +198,7 @@ class Spatial(blenderbim.core.tool.Spatial):
|
||||
@classmethod
|
||||
def load_container_manager(cls):
|
||||
cls.props = bpy.context.scene.BIMSpatialManagerProperties
|
||||
previous_container_index = cls.props.active_container_index
|
||||
cls.props.containers.clear()
|
||||
cls.contracted_containers = json.loads(cls.props.contracted_containers)
|
||||
cls.props.is_container_update_enabled = False
|
||||
@@ -208,7 +209,7 @@ class Spatial(blenderbim.core.tool.Spatial):
|
||||
cls.create_new_storey_li(object, 0)
|
||||
cls.props.is_container_update_enabled = True
|
||||
# triggers spatial manager props setup
|
||||
cls.props.active_container_index = 0
|
||||
cls.props.active_container_index = min(previous_container_index, len(cls.props.containers) - 1)
|
||||
|
||||
@classmethod
|
||||
def create_new_storey_li(cls, element, level_index):
|
||||
|
||||
Reference in New Issue
Block a user