Dynamic GitTree #484
-
Hi All, For each imported STL mesh (working fine), I want to add a new child GitTree entry under my first GitTree heading 'Meshes'. The Trame tutorials mainly presented 'static' UI layouts, whereas I am hoping to have the GitTree update dynamically. Any suggestions on how to deal with this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I'm not sure I understand what you mean. If you dynamically update the state of the sources of the git tree, it will be dynamically updated. This is its primary usage in any of the apps using it. You can find an example of it when using ParaView as a backend here. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot Sebastien, your link helped me find the issue: I was appending a GitTree entry instead of re-writing the source. Working example below for reference.
|
Beta Was this translation helpful? Give feedback.
So the issue you ran into is because you are mutating a state variable in a way that the shared state was not able to detect. A way to handle it without replacing the state variable is to call dirty like stated in the How to start - forcing state exchange.
In other words, you could also have done