Skip to content

Toggle session manager button availability depending on session selection

The enabled state of buttons of the session manager dialog is now set depending on whether a session is selected in the list view. Previously, buttons were always enabled, even if they didn't do anything because no session was selected.

The implementation is accomplished by connecting the reset signal of the session model as well as the selectionChanged signal of the listview to handlers, which update the button state.

Test Plan

To test, open the session manager through File > Sessions... and edit sessions, the buttons should be disabled whenever they don't provide functionality, because nothing is selected, otherwise enabled.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports