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

Use new effect.ParentClip() for more efficient property lookup, fix cutting closeEvent() #3817

Merged
merged 2 commits into from
Nov 6, 2020

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Nov 1, 2020

When getting properties for an effect, we also need its parent clip's parameters for positioning.
I realized I'd left a hole in the libopenshot Timeline lookup APIs by not providing a way to easily look that up. Fortunately, @jonoomph was nice enough to fill that hole with recent libopenshot changes.

So, this PR uses effect.ParentClip() to grab the corresponding clip data at the same time it looks up the effect data, preventing us having to chase it down later.

It also fixes a bug that #3784 created with the cutting module ("Split Clip..." window). It seems that calling event.accept() in a closeEvent() handler, then going on to do more cleanup work on your local data, is a bad idea and leaves you with a window that won't close. Removing the event.accept() fixed it, though possibly just calling super().close() would have as well. I haven't explored that possibility.

Apparently, doing that when you plan to do more work in the event
handler will prevent the window from closing at all. (Perhaps we
could fix this by calling super().close() after? Worth checking into.)
@ferdnyc ferdnyc added interface GUI / user interface issues (i.e. windows, buttons, scrolling, pop-ups, etc...) libopenshot Issues or PRs that involve the libopenshot C++ backend labels Nov 1, 2020
@ferdnyc
Copy link
Contributor Author

ferdnyc commented Nov 6, 2020

Oops, did I forget to merge this?

@ferdnyc ferdnyc merged commit 0a729c3 into OpenShot:develop Nov 6, 2020
@ferdnyc ferdnyc deleted the effect-parent branch November 6, 2020 21:44
@jonoomph
Copy link
Member

jonoomph commented Nov 6, 2020

Nice! LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interface GUI / user interface issues (i.e. windows, buttons, scrolling, pop-ups, etc...) libopenshot Issues or PRs that involve the libopenshot C++ backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants