-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
There's a potential issue here: if dragged_label_for_reinsert is None (meaning the label widget couldn't be found in self._labels), an error is printed, and the event is ignored. However, self._traces.pop(original_idx) (line 279) has already modified the _traces list.
This could leave the SubPlotWidget in an inconsistent state where _traces and _labels are out of sync.
Could we, for instance, find dragged_label_for_reinsert before modifying self._traces? Or, if an error occurs after _traces.pop(), should there be an attempt to restore _traces to its previous state to maintain consistency?
Originally posted by @gemini-code-assist[bot] in #2 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels