Improve New/Rename Label dialog
Summary:
Keep order of custom suggestions
- Standard suggestions are still sorted
- The order of custom suggestions is not changed
- Custom suggestions are now listed before standard suggestions when combined
Handling of duplicate suggestions
- Duplicates of suggestions regarding their name will be ignored...
- Unless they can complete an original suggestion with a color
- Custom suggestions have a higher priority regarding duplicates
Save and restore dialog geometry
The geometry of the dialog is now persisted.
Rename label on ALT + double click
There are two different idioms for double clicking on an item in
applications: Activate/focus/edit the item or rename the item.
Double clicking on a label entry already centers the crosshair to the
centroid of the label. To allow for another quick convenient access
to renaming in addition to "CTRL+L, R", we now also check for the
ALT keyboard modifier on a double click.
Note that it must be ALT since both CTRL and SHIFT are already entangled
in selection interaction like selecting multiple items.
Other fixes
Fix deadlock in preferences when using PutByteArray()
Like all the other Put...() methods, PutByteArray() eventually calls Put(),
which already locks the same mutex.
Removed unused includes
Nothing to add.
Fixes T29338
Test Plan: I did an extensive manual testing with and without custom suggestions in all combinations of related preferences.
Reviewers: floca, O1 MITK Reviewer Group I, O3 MITK Reviewer Group II
Reviewed By: floca, O1 MITK Reviewer Group I, O3 MITK Reviewer Group II
Maniphest Tasks: T29338
Differential Revision: https://phabricator.mitk.org/D733