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

Fix visual editor event copy/paste issues #2459

Merged
merged 5 commits into from
Nov 11, 2024

Conversation

salianifo
Copy link
Contributor

@salianifo salianifo commented Oct 29, 2024

Closes: #2455
Closes: #2407

When pasting into an empty timeline, the paste position would be set to -1, making the first item pop down to the end of the list.

@salianifo salianifo changed the title Fix multiple copied items order Fix visual editor event pasting issues Oct 29, 2024
@salianifo salianifo changed the title Fix visual editor event pasting issues Fix visual editor event copy/paste issues Oct 29, 2024
@salianifo
Copy link
Contributor Author

Since I'm looking at the copy/paste features of the visual timeline, I noticed there's a few other things that need to be fixed as well, such as nested events not being nested when pasted.

@salianifo
Copy link
Contributor Author

I noticed that when you paste into a timeline with events (but none selected), it pastes right before the last event instead of after it. This last change fixes this as well. I think the other copy/paste/move issues need discussion, and should be addressed in another PR.

@CakeVR CakeVR added the Bug 🐞 Something isn't working label Nov 11, 2024
@Jowan-Spooner
Copy link
Collaborator

Why did you change it from using from_text to _load_from_string? It sounds correct to me, but it makes me wonder if we should also use _store_as_string() instead of to_text(), to avoid the translation ids getting lost. Was there something specific that mad you change it?

@salianifo
Copy link
Contributor Author

salianifo commented Nov 11, 2024

Yes, when you have custom defaults set, they get loaded in _load_from_string which then calls from_text. Without this, if you copy an event that has and uses custom defaults, when pasting it will paste the original defaults instead. My tester set a default audio bus for Voice events, but when copying and pasting a brand new event it would paste it with Master instead of Voice for the audio bus.

Edit:
As for the second point, that is probably a good idea, as well. I haven't used translations at all.

@Jowan-Spooner
Copy link
Collaborator

Looks good to me. Tysm!

@Jowan-Spooner Jowan-Spooner merged commit 69760b1 into dialogic-godot:main Nov 11, 2024
3 checks passed
@salianifo salianifo deleted the timeline-paste-fix branch November 11, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Something isn't working
Projects
None yet
3 participants