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

Can't send object to another layer when only 2 object layers are present in the map #3417

Closed
user72356 opened this issue Jul 20, 2022 · 2 comments
Labels
bug Broken behavior.

Comments

@user72356
Copy link

The option to select an object, right click and send it to another layer only appears when 3 object layers are present in map. I would expect to start seeing the option when 2 layers are present.

Thank you!

@user72356 user72356 added the bug Broken behavior. label Jul 20, 2022
@eishiya
Copy link
Contributor

eishiya commented Jul 21, 2022

The culprit seems to be this double check for objectGroupsIterator.next() - it wants two nexts, i.e. a second layer and a third layer.
https://github.com/mapeditor/tiled/blob/master/src/tiled/abstractobjecttool.cpp#L702
Was this perhaps meant to be if (objectGroupsIterator && objectGroupsIterator.next())?

@bjorn bjorn closed this as completed in c313de0 Aug 4, 2022
@bjorn
Copy link
Member

bjorn commented Aug 4, 2022

Was this perhaps meant to be if (objectGroupsIterator && objectGroupsIterator.next())?

Yeah, actually the begin function already calls the first next, so there should be only one additional call. Good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken behavior.
Projects
None yet
Development

No branches or pull requests

3 participants