HomePhabricator
Diffusion MITK 1df5a1490746

Improve New/Rename Label dialog

Description

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

Details

Provenance
kislinskAuthored on Oct 12 2022, 5:42 PM
kislinskPushed on Oct 14 2022, 5:21 PM
Reviewer
O1: MITK Reviewer Group I
Differential Revision
Restricted Differential Revision
Parents
rMITK2eaeccd56c73: T28851-AddITKGrowCutTool_add_progress_bar_usage
rMITK8a1b79c3cdcc: Only allow suggestions with unique names
Branches
Unknown
Tags
Unknown
Tasks
T29338: "Rename Label" window improvements