@@ -1046,6 +1046,10 @@ class SciView : SceneryBase, CalibratedRealInterval<CalibratedAxis> {
10461046 // help window
10471047 h.addBehaviour(" show help" , showHelpDisplay())
10481048 h.addKeyBinding(" show help" , " F1" )
1049+
1050+ // update scene inspector
1051+ h.addBehaviour(" update scene graph" , ClickBehaviour { _: Int , _: Int -> requestPropEditorRefresh() })
1052+ h.addKeyBinding(" update scene graph" , " shift ctrl I" )
10491053 }
10501054
10511055 /*
@@ -1082,7 +1086,7 @@ class SciView : SceneryBase, CalibratedRealInterval<CalibratedAxis> {
10821086 inner class AnimatedCenteringBeforeArcBallControl : ArcballCameraControl {
10831087 // a bunch of necessary c'tors (originally defined in the ArcballCameraControl class)
10841088 constructor (name: String , n: Function0 <Camera ?>, w: Int , h: Int , target: Function0 <Vector3f >) : super (name, n, w, h, target) {}
1085- constructor (name: String ,n: Supplier <Camera ?>, w: Int , h: Int , target: Supplier <Vector3f >) : super (name, n, w, h, target) {}
1089+ constructor (name: String , n: Supplier <Camera ?>, w: Int , h: Int , target: Supplier <Vector3f >) : super (name, n, w, h, target) {}
10861090 constructor (name: String , n: Function0 <Camera ?>, w: Int , h: Int , target: Vector3f ) : super (name, n, w, h, target) {}
10871091 constructor (name: String , n: Supplier <Camera ?>, w: Int , h: Int , target: Vector3f ) : super (name, n, w, h, target) {}
10881092
@@ -2383,6 +2387,21 @@ class SciView : SceneryBase, CalibratedRealInterval<CalibratedAxis> {
23832387 return " Node name: " + n.name + " Node type: " + n.nodeType + " To String: " + n
23842388 }
23852389
2390+ /* *
2391+ * Triggers the inspector tree to be completely rebuilt/refreshed.
2392+ */
2393+ fun requestPropEditorRefresh () {
2394+ eventService!! .publish(NodeChangedEvent (scene))
2395+ }
2396+
2397+ /* *
2398+ * Triggers the inspector to rebuild/refresh the given node.
2399+ * @param n Root of the subtree to get rebuilt/refreshed.
2400+ */
2401+ fun requestPropEditorRefresh (n : Node ? ) {
2402+ eventService!! .publish(NodeChangedEvent (n))
2403+ }
2404+
23862405 companion object {
23872406 // bounds for the controls
23882407 @JvmField
0 commit comments