Fix loading and saving of LabelSet presets and make it more accessible
Summary:
Rename LabelSet preset actions
Clean up LabelSet preset actions
Code was in pretty bad copy & paste style shape. I also made the code
actually loop over selected nodes instead of panicking if one of the
nodes does not fit. Loading a preset now applies it to all selected
labelset images.
Make loading and saving presets work in principle
Loading of layers != 0 and their labels works now, too.
Ignore bogus exterior labels
Apply preset to already existing labels
Update label set lookup table after modifying its labels
Update controls when active layer changed
This will also trigger when new layers were added. To make this work
I had to unbreak a subscribe/unsubscribe circle of the BeforeChangeLayer
event. I am not 100% sure that this did not break any edge cases so I
commented the lines instead of removing them.
Add LabelSet preset buttons
Fixes T27851
Test Plan: Manually saved and loaded presets and checked overriding of existing label properties.
Reviewers: O1 MITK Reviewer Group I, kalali
Reviewed By: O1 MITK Reviewer Group I, kalali
Subscribers: kalali
Maniphest Tasks: T27851
Differential Revision: https://phabricator.mitk.org/D431