TimeLineAnnotator / desktop

A GUI for graphical analysis and annotation of video and audio files.
https://tilia-app.com
Creative Commons Attribution Share Alike 4.0 International
8 stars 2 forks source link

Lowering parent and child level at the same time is not always working #63

Closed FelipeDefensor closed 1 year ago

FelipeDefensor commented 1 year ago

Yields this error:

Traceback (most recent call last):
  File "tkinter/__init__.py", line 1924, in __call__
  File "tilia/ui/event_handler.py", line 107, in <lambda>
  File "tilia/events.py", line 156, in post
Exception: Exception when notifying about Event.HIERARCHY_TOOLBAR_BUTTON_PRESS_LEVEL_DECREASE with args=(), kwargs={}
 root                                               499   DEBUG    Processing decrease button click in Forma | Hierarchy Timeline...
 root                                               292   DEBUG    Requesting timeline to decrease level of Hierarchy(140654982297056).
 root                                               47    ERROR    Uncaught exception
Traceback (most recent call last):
  File "tilia/events.py", line 154, in post
  File "tilia/ui/timelines/hierarchy/timeline.py", line 99, in <lambda>
  File "tilia/ui/timelines/hierarchy/timeline.py", line 295, in on_change_level_button
  File "tilia/timelines/hierarchy/timeline.py", line 57, in change_level_by_amount
  File "tilia/timelines/hierarchy/timeline.py", line 172, in change_level_by_amount
  File "tilia/timelines/hierarchy/timeline.py", line 166, in _validate_change_level
tilia.timelines.hierarchy.components.HierarchyOperationError: Can't change level: new level would be <= child level.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "tkinter/__init__.py", line 1924, in __call__
  File "tilia/ui/timelines/hierarchy/toolbar.py", line 40, in <lambda>
  File "tilia/events.py", line 156, in post
Exception: Exception when notifying about Event.HIERARCHY_TOOLBAR_BUTTON_PRESS_LEVEL_DECREASE with args=(), kwargs={}
 root                                               499   DEBUG    Processing decrease button click in Forma | Hierarchy Timeline...
 root                                               292   DEBUG    Requesting timeline to decrease level of Hierarchy(140654982297056).
 root                                               47    ERROR    Uncaught exception
Traceback (most recent call last):
  File "tilia/events.py", line 154, in post
  File "tilia/ui/timelines/hierarchy/timeline.py", line 99, in <lambda>
  File "tilia/ui/timelines/hierarchy/timeline.py", line 295, in on_change_level_button
  File "tilia/timelines/hierarchy/timeline.py", line 57, in change_level_by_amount
  File "tilia/timelines/hierarchy/timeline.py", line 172, in change_level_by_amount
  File "tilia/timelines/hierarchy/timeline.py", line 166, in _validate_change_level
tilia.timelines.hierarchy.components.HierarchyOperationError: Can't change level: new level would be <= child level.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "tkinter/__init__.py", line 1924, in __call__
  File "tilia/ui/timelines/hierarchy/toolbar.py", line 40, in <lambda>
  File "tilia/events.py", line 156, in post
Exception: Exception when notifying about Event.HIERARCHY_TOOLBAR_BUTTON_PRESS_LEVEL_DECREASE with args=(), kwargs={}
 root                                               499   DEBUG    Processing decrease button click in Forma | Hierarchy Timeline...
 root                                               292   DEBUG    Requesting timeline to decrease level of Hierarchy(140654982297056).
 root                                               47    ERROR    Uncaught exception
Traceback (most recent call last):
  File "tilia/events.py", line 154, in post
  File "tilia/ui/timelines/hierarchy/timeline.py", line 99, in <lambda>
  File "tilia/ui/timelines/hierarchy/timeline.py", line 295, in on_change_level_button
  File "tilia/timelines/hierarchy/timeline.py", line 57, in change_level_by_amount
  File "tilia/timelines/hierarchy/timeline.py", line 172, in change_level_by_amount
  File "tilia/timelines/hierarchy/timeline.py", line 166, in _validate_change_level
tilia.timelines.hierarchy.components.HierarchyOperationError: Can't change level: new level would be <= child level.

Change level order is probably being calculated incorrectly.