-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
Add a "Reverse" command to the "Order" menu #2273
Add a "Reverse" command to the "Order" menu #2273
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works like a charm, thanks. Your code didn't compile for some reason (maybe you pushed a slightly outdated version?) but I fixed that by changing some mut
keywords. I also cleaned up a lot of cargo fmt
and cargo clippy
issues, and then did a review for code style (things like starting comments with a capital letter and a space after the //
). And I fixed a logic bug with the undo/redo history. Feel free to look over my diff for learning purposes. Thanks for this valuable contribution! Let me know if you need help finding the next issue to work on.
Thanks! I'll do better next time. |
You're all good, this is in the range of ordinary code review tweaks, especially for a first time contribution. Welcome! |
Closes #2271
![Screenshot 2025-02-08 193630](https://private-user-images.githubusercontent.com/77986110/411241698-217c4bd9-abae-44cb-8872-ed05fd919735.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MzQyMDgsIm5iZiI6MTczOTUzMzkwOCwicGF0aCI6Ii83Nzk4NjExMC80MTEyNDE2OTgtMjE3YzRiZDktYWJhZS00NGNiLTg4NzItZWQwNWZkOTE5NzM1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDExNTE0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI5YWE0MjAxOGI4MTQxYzhkNGJiNjk4YTNjNWM2MWZhZTFmNjNjYjI3ZjVjM2UwM2JhYzg3N2FlZDU3NThhZTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.nX9Z8gj8oxvVltzKui3B8XDUWd0BbsfzjQjNDSRhwWA)
If multiple noncontiguous ranges are present with the same direct parent (they're siblings in the nesting hierarchy), all the selected items should be swapped as part of the same list: [1], [2], 3, 4, [5], [6] should become [6], [5], 3, 4, [2], [1] (where [] indicates selection).
![Screenshot 2025-02-08 193704](https://private-user-images.githubusercontent.com/77986110/411241745-5c9c5d94-edb6-4c5e-8ce8-479c9ab0dfb5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MzQyMDgsIm5iZiI6MTczOTUzMzkwOCwicGF0aCI6Ii83Nzk4NjExMC80MTEyNDE3NDUtNWM5YzVkOTQtZWRiNi00YzVlLThjZTgtNDc5YzlhYjBkZmI1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDExNTE0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE1MzI2NGQyMzc2MzA2YTQ1MjMwN2FjMzIwM2VmM2UyM2IzZTI3YWQ0YWU0MWVlODMxZDRmNzI5ZDU5Yjc5MTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.AoXyMgnw-Z5c5DpAZY30-KupwfQdOIx-2bzdaRxTFDA)
![Screenshot 2025-02-08 193642](https://private-user-images.githubusercontent.com/77986110/411241748-6d5aefda-b3c3-46a7-86b2-9c39a0e45bc0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MzQyMDgsIm5iZiI6MTczOTUzMzkwOCwicGF0aCI6Ii83Nzk4NjExMC80MTEyNDE3NDgtNmQ1YWVmZGEtYjNjMy00NmE3LTg2YjItOWMzOWEwZTQ1YmMwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDExNTE0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc3NjU3OGJjNzA0MTUzOGVjN2FhZjc3ZGQxNGYxYzRmNjk5NzNkOGI0ZjBkMDViYWQ1ZTQzYmNhZjUwYjllOGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.MjQYUdLtxjtaaCR7iGwacD3D3aMgLzQeLxmxsgF0m-k)
If any selected layer has a selected ancestor, only the ancestor is considered selected and all children/descendants are ignored as part of the selection.