Description
When a user starts an edit session and then clicks a different node in the pipeline browser, the session is not aborted or warned — but the backend's active source silently switches to the new node while EditSession.working_dataset still holds a deep copy of the original node's mesh.
Steps to reproduce
- Load a mesh and start an edit session (Edit Tools → Begin Edit Session).
- While the session is active, click a different node in the pipeline browser.
- The viewport updates to show the new node, but
edit_session_active remains True and the edit panel stays open.
- Make a selection and commit.
What goes wrong
on_active_pipeline_item_change (state_handlers.py:56) has no guard for edit_session_active, so pv_backend.set_active_node() runs unconditionally.
- After the switch,
pv_backend.source points to the new node, but edit_session.working_dataset is still the deep copy of the original node.
- Any pick/selection event is now dispatched against the wrong source in the backend.
- A commit saves the session's working dataset (from the original node) to the original filename, regardless of what is displayed.
Risk
Silent data-integrity issue: the user may believe they are editing the currently displayed mesh, but edits land on the original node's file.
Candidate fixes
- Block switching (simplest): in
on_active_pipeline_item_change, return early if state.edit_session_active is True and optionally show a notification explaining why the switch was ignored.
- Prompt to discard (friendlier): detect the switch attempt, show a confirmation dialog ("Discard current edit session and switch node?"), and only proceed if confirmed.
Description
When a user starts an edit session and then clicks a different node in the pipeline browser, the session is not aborted or warned — but the backend's active source silently switches to the new node while
EditSession.working_datasetstill holds a deep copy of the original node's mesh.Steps to reproduce
edit_session_activeremainsTrueand the edit panel stays open.What goes wrong
on_active_pipeline_item_change(state_handlers.py:56) has no guard foredit_session_active, sopv_backend.set_active_node()runs unconditionally.pv_backend.sourcepoints to the new node, butedit_session.working_datasetis still the deep copy of the original node.Risk
Silent data-integrity issue: the user may believe they are editing the currently displayed mesh, but edits land on the original node's file.
Candidate fixes
on_active_pipeline_item_change, return early ifstate.edit_session_activeisTrueand optionally show a notification explaining why the switch was ignored.