Describe the bug
Error when clicking 'move up' or 'move down' in the notebook, above or below the maximum level. Also, the page after that is only deleted after a double deletion.
To Reproduce
Steps to reproduce the behavior:
Go to 'Notebook'
Create two or more pages
Click on 'Move up' or 'Move down' until the page is at the very bottom or the top
Continue clicking
Try to delete page
See error
Expected behavior
'Move down' button should become unavailable when the minimum page level is reached, but 'Move up' button should work. 'Move up' button should stop working when the maximum page level is reached, but 'Move down' button should work.
Screenshots
Environment
Linux/Debian Testing
Version
Master
Additional context
Error in chat when you click 'Move up' and the page reaches the maximum level: [ERROR] scene/gui/item_list.cpp:304 move_item: Index p_to_idx = -1 is out of bounds (items.size() = 2).
[ERROR] scene/gui/item_list.cpp:303 move_item: Index p_from_idx = -1 is out of bounds (items.size() = 2).
Error in chat when deleting a page for the first time: [ERROR] scene/gui/item_list.cpp:80 get_item_text: Index p_idx = -2 is out of bounds (items.size() = 2).
[ERROR] scene/gui/item_list.cpp:322 remove_item: Index p_idx = -2 is out of bounds (items.size() = 2).
[ERROR] ./core/cowdata.h:164 remove: Index p_index = -2 is out of bounds (size() = 2).
Describe the bug Error when clicking 'move up' or 'move down' in the notebook, above or below the maximum level. Also, the page after that is only deleted after a double deletion.
To Reproduce Steps to reproduce the behavior:
Expected behavior 'Move down' button should become unavailable when the minimum page level is reached, but 'Move up' button should work. 'Move up' button should stop working when the maximum page level is reached, but 'Move down' button should work.
Screenshots
Environment Linux/Debian Testing
Version Master
Additional context Error in chat when you click 'Move up' and the page reaches the maximum level: [ERROR] scene/gui/item_list.cpp:304 move_item: Index p_to_idx = -1 is out of bounds (items.size() = 2). [ERROR] scene/gui/item_list.cpp:303 move_item: Index p_from_idx = -1 is out of bounds (items.size() = 2).
Error in chat when deleting a page for the first time: [ERROR] scene/gui/item_list.cpp:80 get_item_text: Index p_idx = -2 is out of bounds (items.size() = 2). [ERROR] scene/gui/item_list.cpp:322 remove_item: Index p_idx = -2 is out of bounds (items.size() = 2). [ERROR] ./core/cowdata.h:164 remove: Index p_index = -2 is out of bounds (size() = 2).