scenerygraphics / sciview

sciview is a tool for visualization and interaction with ND image and mesh data
BSD 2-Clause "Simplified" License
68 stars 17 forks source link

Node name width is too small in inspector when creating some nodes #446

Open kephale opened 1 year ago

kephale commented 1 year ago

To recreate:

  1. Launch SciView
  2. Demo > Basic > Lines

The Name of the node is smaller in the inspector UI than it should be.

image
kephale commented 1 year ago

The text box in the tree view does get updated once you click on the Name text box in the properties panel.

kephale commented 1 year ago

@moreApi I think you did something like this recently. I suspect the problem is that we are using scenery's setName on a sciview node and the update doesn't trigger a tree refresh, here: https://github.com/scenerygraphics/sciview/blob/89f7c93a722ccc70fb20939218558c25060b97c7/src/main/java/sc/iview/commands/demo/basic/LineDemo.java#L72

How do we fix these things?

moreApi commented 1 year ago

I did some property change watching for my network stuff, but there I looked actively.

Since we have no system in place to listen to property changes, we have to manually trigger an update if the name is changed, build something of a property change observable or look each frame for a change.

The text of the field is updated right? Then we "just" need to find where that happens and update the size of the field.