- Timestamp:
- 07/18/13 23:52:25 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/main/src/main/java/com/framsticks/gui/tree/TreeModel.java
r101 r103 19 19 import com.framsticks.core.SideNoteKey; 20 20 import com.framsticks.core.TreeOperations; 21 import com.framsticks.core.ValueChange; 21 22 import com.framsticks.gui.Frame; 22 23 import com.framsticks.params.Access; … … 321 322 322 323 323 protected void registerForEventParam(final TreeNode treeNode, Path path, final EventParam eventParam, ValueParam valueParam) {324 protected void registerForEventParam(final TreeNode treeNode, Path path, final EventParam eventParam, final ValueParam valueParam) { 324 325 /** TODO make this listener not bind hold the reference to this TreeNode, maybe hold WeakReference internally */ 325 326 if (valueParam instanceof PrimitiveParam) { … … 328 329 @Override 329 330 public void action(Object argument) { 330 loadPath(treeNode.assurePath(), true); 331 assert treeNode.getTree().isActive(); 332 if (argument instanceof ValueChange) { 333 ValueChange valueChange = (ValueChange) argument; 334 Path path = treeNode.assurePath(); 335 bindAccess(path).set(valueParam, valueChange.value); 336 frame.updatePanelIfIsLeadSelection(path); 337 } else { 338 loadPath(treeNode.assurePath(), true); 339 } 331 340 } 332 341 });
Note: See TracChangeset
for help on using the changeset viewer.