Fix regression on job deletion when sorting jobs based on altitude and priority…

Authored by TallFurryMan on Oct 13 2018, 10:11 AM.

Description

Fix regression on job deletion when sorting jobs based on altitude and priority is enabled.

Summary:
Refactoring job manipulation did include both arrows for job reordering and button for job deletion.
When using that refactored function to prevent reordering of jobs sorted by altitude and priority, the job deletion was mistakenly impacted too.
This differential fixes this issue.

Test Plan:
Disable Ekos option "Sort Jobs by Altitude and Priority", and load or create a schedule.
Observe as jobs can be reordered and deleted without issue.
Enable Ekos option "Sort Jobs by Altitude and Priority".
BUG: Observe as the button bar does not change when saving settings, but updates as soon as a job is clicked.
Without this differential, clicking on a job disables the reorder buttons and the delete button.
With this differential, clicking on a job disables the reorder buttons, but not the delete button.
Check that starting the scheduler still disables both reorder and delete buttons, and that stopping resets them based on the sort option.
Check that both reorder and delete buttons are disabled when there is no job in the list.
Check that the reorder buttons are disabled, but the delete button is kept enabled when there is one single job in the list.

Note: this will need a signal to indicate options were updated, so that UI may react to changes immediately.

Reviewers: mutlaqja, wreissenberger

Reviewed By: mutlaqja

Subscribers: kde-edu

Tags: KDE Edu

Differential Revision: https://phabricator.kde.org/D16173