Viewer remains connected to clip when clip is deleted
@aleb
Submitted by Alex Băluț Assigned to Stefan-Adrian Popa @stefanzzz
Description
Steps to reproduce:
- Create a new project, import simpsons
- Add to timeline, click the clip to select it
- Press Del to delete it, notice the viewer still shows the clip, it should show black
- Click the viewer, notice backtraces in the console:
Traceback (most recent call last):
File "/home/aleb/dev/pitivi/pitivi/pitivi/viewer/overlay_stack.py", line 92, in do_event
self.selected_overlay.on_button_press()
File "/home/aleb/dev/pitivi/pitivi/pitivi/viewer/move_scale_overlay.py", line 417, in on_button_press
self._source.get_timeline().get_parent()),
AttributeError: 'NoneType' object has no attribute 'get_parent'
Traceback (most recent call last):
File "/home/aleb/dev/pitivi/pitivi/pitivi/undo/undo.py", line 342, in _get_last_stack
stack = self.stacks.pop(-1)
IndexError: pop from empty list
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/aleb/dev/pitivi/pitivi/pitivi/viewer/overlay_stack.py", line 79, in do_event
self.selected_overlay.on_button_release(cursor_position)
File "/home/aleb/dev/pitivi/pitivi/pitivi/viewer/move_scale_overlay.py", line 435, in on_button_release
self.__action_log.commit("Video position change")
File "/home/aleb/dev/pitivi/pitivi/pitivi/undo/undo.py", line 274, in commit
stack = self._get_last_stack(pop=True)
File "/home/aleb/dev/pitivi/pitivi/pitivi/undo/undo.py", line 346, in _get_last_stack
raise UndoWrongStateError("No transaction")
pitivi.undo.undo.UndoWrongStateError: No transaction