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

keep parent canvas referenced from cloned instance #972

Merged
merged 3 commits into from Jul 12, 2021

Conversation

Ant1r
Copy link
Contributor

@Ant1r Ant1r commented May 2, 2020

After creating a cloned instance, the reference to its parent canvas is currently cleared:

retval->gl_owner = 0;

This PR proposes to keep this gl_owner reference intact, and use glist's field gl_isclone instead for discriminating clones when needed.

It allows a clone instance to behave just like any abstraction, and in particular it makes possible to:

I basically replaced:
if (x->gl_owner)
with:
if (x->gl_owner && !x->gl_isclone)
where relevant.

(EDIT: I had previously forbidden [pdcontrol] to go back to clone's parent and retrieve its info, which wasn't necessary... I reverted that).

@Ant1r Ant1r changed the title keep parent reference in cloned instance keep parent canvas referenced from cloned instance May 29, 2020
@millerpuckette millerpuckette merged commit 5a7bdbf into pure-data:master Jul 12, 2021
@Ant1r Ant1r deleted the clone_keep_parent_ref branch October 22, 2021 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants