FrancescoCeruti / linux-show-player

Linux Show Player - Cue player designed for stage productions
https://linux-show-player.org
GNU General Public License v3.0
204 stars 49 forks source link

Removal of a collection cue with no cues crashes the Program #312

Closed bgoldstone closed 4 months ago

bgoldstone commented 4 months ago

Describe the bug This might not be a huge deal, but when I add a collection cue and try and remove a cue that does not exist an index out of bounds error occurs

To Reproduce Steps to reproduce the behavior:

  1. Create New Collection Cue
  2. Right-Click Edit Cue
  3. Go To Edit Collection Tab
  4. Click Remove

Expected behavior Show Error Message saying there is no cue to remove.

Linux Show Player version:

OS Version

Additional context Terminal Log:

qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: setGrabPopup called with a parent, QtWaylandClient::QWaylandXdgSurface(0x558b546ee650) which does not match the current topmost grabbing popup, QtWaylandClient::QWaylandXdgSurface(0x558b546fb300) According to the xdg-shell protocol, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly because xdg-shell mandate that child popups close before parents
qt.qpa.wayland: setGrabPopup called with a parent, QtWaylandClient::QWaylandXdgSurface(0x558b546ee650) which does not match the current topmost grabbing popup, QtWaylandClient::QWaylandXdgSurface(0x558b546fb300) According to the xdg-shell protocol, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly because xdg-shell mandate that child popups close before parents
qt.qpa.wayland: setGrabPopup called with a parent, QtWaylandClient::QWaylandXdgSurface(0x558b546ee650) which does not match the current topmost grabbing popup, QtWaylandClient::QWaylandXdgSurface(0x558b546fb300) According to the xdg-shell protocol, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly because xdg-shell mandate that child popups close before parents
qt.qpa.wayland: setGrabPopup called with a parent, QtWaylandClient::QWaylandXdgSurface(0x558b546ee650) which does not match the current topmost grabbing popup, QtWaylandClient::QWaylandXdgSurface(0x558b546fb300) According to the xdg-shell protocol, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly because xdg-shell mandate that child popups close before parents
qt.qpa.wayland: setGrabPopup called with a parent, QtWaylandClient::QWaylandXdgSurface(0x558b546ee650) which does not match the current topmost grabbing popup, QtWaylandClient::QWaylandXdgSurface(0x558b546fb300) According to the xdg-shell protocol, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly because xdg-shell mandate that child popups close before parents
qt.qpa.wayland: setGrabPopup called with a parent, QtWaylandClient::QWaylandXdgSurface(0x558b546ee650) which does not match the current topmost grabbing popup, QtWaylandClient::QWaylandXdgSurface(0x558b546fb300) According to the xdg-shell protocol, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly because xdg-shell mandate that child popups close before parents
qt.qpa.wayland: setGrabPopup called with a parent, QtWaylandClient::QWaylandXdgSurface(0x558b546ee650) which does not match the current topmost grabbing popup, QtWaylandClient::QWaylandXdgSurface(0x558b546fb300) According to the xdg-shell protocol, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly because xdg-shell mandate that child popups close before parents
qt.qpa.qadwaitadecorations: Failed to find an svg icon for  "window-minimize-symbolic.svg"
qt.qpa.qadwaitadecorations: Failed to find an svg icon for  "window-maximize-symbolic.svg"
qt.qpa.qadwaitadecorations: Failed to find an svg icon for  "window-restore-symbolic.svg"
Traceback (most recent call last):
  File "/app/lib/python3.11/site-packages/lisp/plugins/action_cues/collection_cue.py", line 143, in _removeCurrentCue
    cueId = self.collectionModel.rows[row][0]
            ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
IndexError: list index out of range
FrancescoCeruti commented 4 months ago

Thanks! Now the button is disabled when the list is empty