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

Place new folders in the correct stack order relative to other selected layers #1678

Merged
merged 3 commits into from
Mar 16, 2024

Conversation

moOsama76
Copy link
Contributor

@moOsama76 moOsama76 commented Mar 11, 2024

Sub-issue: new folder creation, closes #1633

@Keavon Keavon changed the title New folder placed directly above the topmost selected layer in the hi… Place new folders in the correct stack order relative to other selected layers Mar 11, 2024
@Keavon
Copy link
Member

Keavon commented Mar 11, 2024

!build

Copy link

📦 Build Complete for 977daea
https://fe30e139.graphite.pages.dev

@Keavon
Copy link
Member

Keavon commented Mar 11, 2024

We'd like it to be placed just above the least-nested layer/folder that has a selection:

image

Right this this goes at the very top which isn't desired. I see in your code, you're using an insert index of 0 which will instead need to be calculated accordingly.

@Keavon Keavon marked this pull request as draft March 11, 2024 23:31
@moOsama76
Copy link
Contributor Author

moOsama76 commented Mar 11, 2024 via email

@moOsama76 moOsama76 marked this pull request as ready for review March 12, 2024 00:48
@Keavon Keavon requested a review from 0HyperCube March 15, 2024 02:07
@Keavon
Copy link
Member

Keavon commented Mar 16, 2024

Please see my diff (49ed337) to learn from my little cleanup so you can write more idiomatic and performant Rust in the future :)

@Keavon Keavon enabled auto-merge (squash) March 16, 2024 07:21
@Keavon Keavon merged commit 6630e2b into GraphiteEditor:master Mar 16, 2024
2 checks passed
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.

Avoid layers being reordered when dealing with groups
2 participants