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

removing a plot does not update the kpanel #445

Open
jmrouet opened this issue Jan 10, 2024 · 1 comment
Open

removing a plot does not update the kpanel #445

jmrouet opened this issue Jan 10, 2024 · 1 comment
Assignees

Comments

@jmrouet
Copy link

jmrouet commented Jan 10, 2024

k3d python and js version is the same: yes 2.16.0

  • K3D version: 2.16.0
  • Python version: 3.9.16
  • Operating System: windows 11 x64

Description

when removing a plot element with the "plot -= xxx" syntax, the plot object still appears in the K3D Panel

What I Did

in a first cell

plot = k3d.plot()
line = k3d.line([0,0,0,1,0,0], name="test", group="toto")
plot += line
plot.display()

here the line is displayed as expected and toto/test appears in the "objects" section of the panel

then in another cell :

plot -= line

actually removes the line plot, but is is still displayed in the panel on the side.

And if unchecking/checking the "visible" toggle button, the line reappears, so actually the reference to the object still exists somewhere.... is there a leak ?

image

if I later progammatically hide and show the menu with

plot.menu_visibility = False
plot.menu_visibility = True

then the menu gets updated, but it is not very convenient

@artur-trzesiok artur-trzesiok self-assigned this Jun 27, 2024
@artur-trzesiok
Copy link
Collaborator

@jmrouet good spot. Very likely my silly error in js code. I will fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants