Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21408 closed defect (fixed)

[PATCH] Fix MultiSelect issues

Reported by: marcello@… Owned by: Don-vip
Priority: normal Milestone: 21.10
Component: Core Version:
Keywords: Cc:

Description

This patch changes <multiselect>s in presets to accept custom values. The old behaviour was to disable itself whenever an unknown value was found.

Fixes: #21385 #21404 #19013

Attachments (4)

21408.patch (58.2 KB ) - added by marcello@… 3 years ago.
21408-2.patch (15.4 KB ) - added by marcello@… 3 years ago.
Fixes vanishing icons, and scrollpane size if icons have different sizes. Also disables multiselect if the selected primitives have different values.
21408-3.patch (9.8 KB ) - added by marcello@… 3 years ago.
replaced. try now
21408-4.patch (9.4 KB ) - added by marcello@… 3 years ago.
patch: fix fill-default property, add tests

Download all attachments as: .zip

Change History (24)

by marcello@…, 3 years ago

Attachment: 21408.patch added

comment:1 by Don-vip, 3 years ago

Milestone: 21.09
Owner: changed from team to Don-vip
Status: newassigned

comment:2 by Don-vip, 3 years ago

Resolution: fixed
Status: assignedclosed

In 18254/josm:

fix #21408 - fix #19013, fix #21385, fix #21404 - Fix MultiSelect issues (patch by marcello)

comment:3 by Don-vip, 3 years ago

Thank you! :)

comment:4 by skyper, 3 years ago

Resolution: fixed
Status: closedreopened

Yes, thank you a lot.

I am still testing so this is just my first feedback but I found some issues:

Major:

  • with two objects with different values selected, adding another value results in adding <different>; + the new value as value.

Minor:

  • please, hide the number in parentheses at the end of the value if only one object is selected
  • icons in the value list vanish if all objects have the same values

Not new, we miss a stronger indication for different values with checks. Right now it is enabled even if the tag is only present on some selected objects. With multiple values there is a small indication but I'd rather like to see a question mark ? or something else but not a check.

Some of the new Jenkins warnings might be worth fixing.

Last edited 3 years ago by skyper (previous) (diff)

comment:5 by skyper, 3 years ago

Regarding row="", I still get scrollbars if the last value's icon is too tall. Probably icon height is not taken into account, yet.

Last edited 3 years ago by skyper (previous) (diff)

in reply to:  5 comment:6 by skyper, 3 years ago

Replying to skyper:

Regarding row="", I still get scrollbars if the last value's icon is too tall. Probably icon height is not taken into account, yet.

An example is the tower:type value list in the "General preset Mast" in Presets/MastAndTower.

comment:7 by marcello@…, 3 years ago

I don't like it myself how <multiselect> works in conjunction with multiple selected primitives. It is very difficult to understand. It would probably be better to disable it if multiple primitives are selected.

Eg. if you select <different> + another value it does not add that value to what is already present on the selected primitives. It cannot do that because we can only write the same value to all selected primitives. (A limitation of the command interface.) What it can do is to overwrite all selected primitives with that value. I'm not sure it should, though.

As for the icon: it works for me. Maybe a skin issue? Which look&feel do you use?

in reply to:  7 comment:8 by skyper, 3 years ago

Replying to marcello@…:

I don't like it myself how <multiselect> works in conjunction with multiple selected primitives. It is very difficult to understand. It would probably be better to disable it if multiple primitives are selected.

At least with different values, this might be better.

Eg. if you select <different> + another value it does not add that value to what is already present on the selected primitives. It cannot do that because we can only write the same value to all selected primitives. (A limitation of the command interface.) What it can do is to overwrite all selected primitives with that value. I'm not sure it should, though.

That works, too. Gives the user more options but also more responsibility.

As for the icon: it works for me. Maybe a skin issue? Which look&feel do you use?

I have tested with "Metal" and now "Dracula" from flatlaf plugin. With both the icons vanish.

  1. Install Presets/MastAndTower
  2. Add a new node, select it and open "Big communication tower" preset (only first letter a capital one) from the external preset.

The icon for tower:type=communication is missing.

  1. Additionally, select tower:type=observation
  2. Close Preset (Ctrl+Return)
  3. Open Preset again

Now both icons are missing.

Last edited 3 years ago by skyper (previous) (diff)

by marcello@…, 3 years ago

Attachment: 21408-2.patch added

Fixes vanishing icons, and scrollpane size if icons have different sizes. Also disables multiselect if the selected primitives have different values.

comment:9 by Don-vip, 3 years ago

Resolution: fixed
Status: reopenedclosed

In 18257/josm:

fix #21408 - Fixes vanishing icons, and scrollpane size if icons have different sizes. Also disables multiselect if the selected primitives have different values (patch by marcello)

comment:10 by Don-vip, 3 years ago

@marcello: this {2}List is weird, is it a copy-paste error?

Logging.error(tr("Broken tagging preset \"{0}-{1}\" - number of items in ''{2}List'' must be the same as in ''values''",
                key, text, name));

comment:11 by marcello@…, 3 years ago

Actually it is correct, but I'll provide a better error message.

comment:12 by Don-vip, 3 years ago

I don't see how to translate this in French.

comment:13 by Don-vip, 3 years ago

there's a problem with the patch it doesn't apply nicely?

by marcello@…, 3 years ago

Attachment: 21408-3.patch added

replaced. try now

comment:14 by Don-vip, 3 years ago

In 18258/josm:

see #21408 - fixups (patch by marcello)

comment:15 by Don-vip, 3 years ago

much better, thanks.

comment:16 by gaben, 3 years ago

The taggingpreset.fill-default-for-tagged-primitives setting stopped working in r18254.

comment:17 by Don-vip, 3 years ago

Resolution: fixed
Status: closedreopened

by marcello@…, 3 years ago

Attachment: 21408-4.patch added

patch: fix fill-default property, add tests

comment:18 by Don-vip, 3 years ago

Resolution: fixed
Status: reopenedclosed

In 18260/josm:

fix #21408 - fix fill-default property, add tests (patch by marcello)

comment:19 by gaben, 3 years ago

Thank you!

comment:20 by Don-vip, 3 years ago

Milestone: 21.0921.10

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.