fix: presence region redraw

fix: clean user widget after disconnection
This commit is contained in:
Swann 2024-03-24 10:37:09 +01:00
parent a87e74842b
commit 60c718ca61
2 changed files with 6 additions and 2 deletions

View File

@ -238,6 +238,9 @@ def on_connection_end(reason="none"):
if on_scene_update in bpy.app.handlers.depsgraph_update_post:
bpy.app.handlers.depsgraph_update_post.remove(on_scene_update)
renderer.clear_widgets()
renderer.add_widget("session_status", SessionStatusWidget())
# Step 3: remove file handled
logger = logging.getLogger()

View File

@ -67,8 +67,9 @@ def refresh_sidebar_view():
"""
area, region, rv3d = view3d_find()
if area:
area.regions[3].tag_redraw()
for region in area.regions:
if region.type == "UI":
region.tag_redraw()
def project_to_viewport(region: bpy.types.Region, rv3d: bpy.types.RegionView3D, coords: list, distance: float = 1.0) -> list: