Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option to change object selection behavior #2865

Merged
merged 3 commits into from
Dec 16, 2020

Conversation

bjorn
Copy link
Member

@bjorn bjorn commented Jul 15, 2020

Previously when clicking objects it would always take the top-most object from any visible and unlocked layer.

This new option allows changing that such that when available, an object from one of the currently selected layers is preferred. It can also be set to only do this, when the highlighting of current layer option is enabled (the new default).

This would close #354.

@bjorn bjorn self-assigned this Jul 15, 2020
@bjorn
Copy link
Member Author

bjorn commented Jul 15, 2020

I can't continue this patch for now, but a remaining change is to apply this new option also when group-selecting objects.

@bjorn
Copy link
Member Author

bjorn commented Sep 29, 2020

Another option that may be good to add, is to only pick objects from selected layers. Then this change will resolve issue #752 as well.

@bjorn bjorn added this to the Tiled 1.5 milestone Dec 11, 2020
Previously when clicking objects it would always take the top-most object
from any visible and unlocked layer.

This new option allows changing that such that when available, an object
from one of the currently selected layers is preferred. It can also be
set to only do this, when the highlighting of current layer option is
enabled (the new default).
@bjorn
Copy link
Member Author

bjorn commented Dec 16, 2020

I'm a bit hesitant about all the modes this new option could have:

  • Select from All Layers (current behavior)
  • Select from Selected Layers
  • Select from Highlighted Layers
  • Prefer Selecting from Selected Layers
  • Prefer Selecting from Highlighted Layers (suggested default)

Maybe @eishiya can help with considering which ones could be left out or how to represent it differently. For example, I could also imagine:

  • Select from All Layers (current behavior)
  • Select from Selected Layers
  • Select from Highlighted Layers
    [ ] Select from All Layers As Fallback (checkbox to avoid too many options, maybe with better name)

And it could also be an option to:

  • Prefer Selecting from Selected Layers, but in "Highlight Current Layer" mode, to select From Selected Layers Only

But how to represent that as an option? :S

@bjorn
Copy link
Member Author

bjorn commented Dec 16, 2020

Maybe have two options:

Selection Behavior:

  • Select from All Layers (current behavior and suggested default)
  • Prefer Selected Layers
  • Only Selected Layers

Selection Behavior when Highlight Current Layer is enabled: (better name?)

  • Prefer Selected Layers (suggested default)
  • Only Selected Layers

Or we could automatically raise the exclusiveness by one level in "Highlight Current Layer" mode.

* Removed PreferHighlightedLayers option, just keeping a consistent
  behavior regardless of that mode.

* Added SelectedLayers mode, which totally ignores objects from other
  layers.

* Made the behavior also affect group-selection and the edit polygon tool.

* The new default is PreferSelectedLayers.
@bjorn bjorn force-pushed the object-selection-behavior branch from c6a9569 to afd4275 Compare December 16, 2020 22:02
Have AllLayers are the default, but raise it to at least
PreferSelectedLayers when Highlight Current Layer is enabled.
@bjorn bjorn merged commit 44c02dc into master Dec 16, 2020
@bjorn bjorn deleted the object-selection-behavior branch December 16, 2020 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Object selection/movement disregards object layer
1 participant