2222 get_crop_element ,
2323 compute_rotation_angle ,
2424 apply_plan_viewrange_from_sectionbox ,
25+ to_world_identity ,
2526)
2627from sectionbox_actions import toggle , hide , align_to_face
2728from sectionbox_geometry import (
@@ -246,12 +247,16 @@ def __init__(self, xaml_file_name):
246247 def update_info (self ):
247248 """Update the information display."""
248249 try :
250+ last_view = self .current_view .Id
249251 self .current_view = doc .ActiveView
250252
251253 if is_2d_view (self .current_view ):
252254 self .btnAlignToView .Content = "Align with 3D View"
255+ self .clear_status_message ()
253256 elif isinstance (self .current_view , DB .View3D ):
254257 self .btnAlignToView .Content = "Align with 2D View"
258+ if last_view != self .current_view .Id :
259+ self .clear_status_message ()
255260
256261 if (
257262 not isinstance (self .current_view , DB .View3D )
@@ -285,7 +290,7 @@ def update_info(self):
285290
286291 # Update top info
287292 if top_level :
288- self .txtTopLevel .Text = "Top: Next level up : {} @ {}" .format (
293+ self .txtTopLevel .Text = "Top: Above : {} @ {}" .format (
289294 top_level .Name , top_level_elevation
290295 )
291296 else :
@@ -296,7 +301,7 @@ def update_info(self):
296301
297302 # Update bottom info
298303 if bottom_level :
299- self .txtBottomLevel .Text = "Bottom: Next level down : {} @ {}" .format (
304+ self .txtBottomLevel .Text = "Bottom: Below : {} @ {}" .format (
300305 bottom_level .Name , bottom_level_elevation
301306 )
302307 else :
@@ -343,7 +348,7 @@ def update_ui():
343348 except Exception as ex :
344349 logger .error ("Error showing status message: {}" .format (ex ))
345350
346- def clear_status_message (self , column ):
351+ def clear_status_message (self , column = None ):
347352 """Clear the status message for the specified column."""
348353 try :
349354
@@ -354,6 +359,10 @@ def update_ui():
354359 self .txtGridStatus .Text = ""
355360 elif column == 3 :
356361 self .txtExpandActionsStatus .Text = ""
362+ elif column is None :
363+ self .txtVerticalStatus .Text = ""
364+ self .txtGridStatus .Text = ""
365+ self .txtExpandActionsStatus .Text = ""
357366
358367 self .Dispatcher .Invoke (System .Action (update_ui ))
359368 except Exception as ex :
@@ -846,7 +855,7 @@ def do_align_to_2d_view(self, params):
846855 1 , "Could not get crop box from section." , "error"
847856 )
848857 return
849- new_box = crop_box
858+ new_box = to_world_identity ( crop_box )
850859
851860 elif crop_box :
852861 # For floor plans, use the existing logic
0 commit comments