@@ -217,11 +217,11 @@ def __init__(self, panel: BaseDataPanel, objclass: SignalObj | ImageObj) -> None
217217 self .analysis_parameters .setFont (font )
218218
219219 # Track newly created objects to show Creation tab only once
220- self ._newly_created_obj_uuid : str | None = None
220+ self .newly_created_obj_uuid : str | None = None
221221 # Track when analysis results were just computed
222- self ._fresh_analysis_obj_uuid : str | None = None
222+ self .fresh_analysis_obj_uuid : str | None = None
223223 # Track when object was just processed (1-to-1)
224- self ._fresh_processing_obj_uuid : str | None = None
224+ self .fresh_processing_obj_uuid : str | None = None
225225
226226 self .tabwidget .addTab (
227227 self .processing_history , get_icon ("history.svg" ), _ ("History" )
@@ -455,23 +455,23 @@ def mark_as_newly_created(self, obj: SignalObj | ImageObj) -> None:
455455 Args:
456456 obj: Object to mark
457457 """
458- self ._newly_created_obj_uuid = get_uuid (obj )
458+ self .newly_created_obj_uuid = get_uuid (obj )
459459
460460 def mark_as_freshly_processed (self , obj : SignalObj | ImageObj ) -> None :
461461 """Mark object to show Processing tab on next selection.
462462
463463 Args:
464464 obj: Object to mark
465465 """
466- self ._fresh_processing_obj_uuid = get_uuid (obj )
466+ self .fresh_processing_obj_uuid = get_uuid (obj )
467467
468468 def mark_as_fresh_analysis (self , obj : SignalObj | ImageObj ) -> None :
469469 """Mark object to show Analysis tab on next selection.
470470
471471 Args:
472472 obj: Object to mark
473473 """
474- self ._fresh_analysis_obj_uuid = get_uuid (obj )
474+ self .fresh_analysis_obj_uuid = get_uuid (obj )
475475
476476 def get_changed_properties (self ) -> dict [str , Any ]:
477477 """Get dictionary of properties that have changed from original values.
@@ -1532,9 +1532,9 @@ def add_object(
15321532 # BUT: Don't overwrite if this object is already marked as freshly processed
15331533 # or has fresh analysis results (those take precedence)
15341534 obj_uuid = get_uuid (obj )
1535- if (
1536- obj_uuid != self .objprop ._fresh_processing_obj_uuid
1537- and obj_uuid != self .objprop ._fresh_analysis_obj_uuid
1535+ if obj_uuid not in (
1536+ self .objprop .fresh_processing_obj_uuid ,
1537+ self .objprop .fresh_analysis_obj_uuid ,
15381538 ):
15391539 self .objprop .mark_as_newly_created (obj )
15401540
@@ -2474,17 +2474,17 @@ def selection_changed(self, update_items: bool = False) -> None:
24742474 if current_obj is not None :
24752475 obj_uuid = get_uuid (current_obj )
24762476 # Show Creation tab for newly created objects (only once)
2477- if obj_uuid == self .objprop ._newly_created_obj_uuid :
2477+ if obj_uuid == self .objprop .newly_created_obj_uuid :
24782478 force_tab = "creation"
2479- self .objprop ._newly_created_obj_uuid = None
2479+ self .objprop .newly_created_obj_uuid = None
24802480 # Show Processing tab for freshly processed objects (only once)
2481- elif obj_uuid == self .objprop ._fresh_processing_obj_uuid :
2481+ elif obj_uuid == self .objprop .fresh_processing_obj_uuid :
24822482 force_tab = "processing"
2483- self .objprop ._fresh_processing_obj_uuid = None
2483+ self .objprop .fresh_processing_obj_uuid = None
24842484 # Show Analysis tab for objects with fresh analysis results
2485- elif obj_uuid == self .objprop ._fresh_analysis_obj_uuid :
2485+ elif obj_uuid == self .objprop .fresh_analysis_obj_uuid :
24862486 force_tab = "analysis"
2487- self .objprop ._fresh_analysis_obj_uuid = None
2487+ self .objprop .fresh_analysis_obj_uuid = None
24882488
24892489 self .objprop .update_properties_from (current_obj , force_tab = force_tab )
24902490 self .acthandler .selected_objects_changed (selected_groups , selected_objects )
0 commit comments