Fix crash on group removal
Summary:
- Add convenience method for counting groups. Makes code more readable/easy to understand than calling rowCount().
- Fix determination of group count for group removal.
Fixes T29545
Test Plan:
- Try to delete last remaining group
- Option to do so shouldn't appear
- Even when doing so through other faulty UI (see T29551: [Segmentation] Label tool buttons should be updated whenever the model changes), a message box pops up explaining that it cannot be done
- Try to delete any other group
- No issues
Reviewers: floca, O1 MITK Reviewer Group I
Reviewed By: floca, O1 MITK Reviewer Group I
Maniphest Tasks: T29545
Differential Revision: https://phabricator.mitk.org/D811