Permalink
Browse files

fixed #208

  • Loading branch information...
keyemkey committed Jul 7, 2013
1 parent 3be234f commit 277dabc71883927ae7d45aff5779f7b0fab8e9ee
@@ -49,6 +49,7 @@ package awaybuilder.controller.scene
{
animationSet.animations.addItem( new SharedAnimationNodeVO(item.value as AnimationNodeVO) );
}
+ animationSet.fillFromAnimationSet( animationSet );
}
}
}
@@ -54,6 +54,7 @@ package awaybuilder.controller.scene
{
picker.lights.addItem( new SharedLightVO(item.value as LightVO) );
}
+ picker.fillLightPicker( picker );
}
}
}
@@ -53,7 +53,9 @@ package awaybuilder.controller.scene
{
material.effectMethods.addItem( new SharedEffectVO(item.value as EffectVO) );
}
+ material.fillFromMaterial( material );
}
+
}
}
}
@@ -1,6 +1,8 @@
package awaybuilder.model.vo.scene
{
import awaybuilder.model.vo.scene.interfaces.IShared;
+
+ import mx.events.PropertyChangeEvent;
[Bindable]
public class SharedAnimationNodeVO extends AnimationNodeVO implements IShared
@@ -11,6 +13,12 @@ package awaybuilder.model.vo.scene
this.fillFromAnimationNode( animationNodeVO );
this.id = animationNodeVO.id;
this.linkedAsset = animationNodeVO;
+ IEventDispatcher( this.linkedAsset ).addEventListener( PropertyChangeEvent.PROPERTY_CHANGE, linkedAsset_propertyChangeHandler );
+ }
+
+ private function linkedAsset_propertyChangeHandler( event:PropertyChangeEvent ):void
+ {
+ this.fillFromAnimationNode( linkedAsset as AnimationNodeVO );
}
public var linkedAsset:AssetVO;
@@ -1,6 +1,10 @@
package awaybuilder.model.vo.scene
{
import awaybuilder.model.vo.scene.interfaces.IShared;
+
+ import flash.events.IEventDispatcher;
+
+ import mx.events.PropertyChangeEvent;
[Bindable]
public class SharedEffectVO extends EffectVO implements IShared
@@ -11,6 +15,13 @@ package awaybuilder.model.vo.scene
this.fillFromEffectMethod( effectVO );
this.id = effectVO.id;
this.linkedAsset = effectVO;
+
+ IEventDispatcher( this.linkedAsset ).addEventListener( PropertyChangeEvent.PROPERTY_CHANGE, linkedAsset_propertyChangeHandler );
+ }
+
+ private function linkedAsset_propertyChangeHandler( event:PropertyChangeEvent ):void
+ {
+ this.fillFromEffectMethod( linkedAsset as EffectVO );
}
public var linkedAsset:AssetVO;
@@ -1,6 +1,8 @@
package awaybuilder.model.vo.scene
{
import awaybuilder.model.vo.scene.interfaces.IShared;
+
+ import mx.events.PropertyChangeEvent;
[Bindable]
public class SharedLightVO extends LightVO implements IShared
@@ -11,6 +13,12 @@ package awaybuilder.model.vo.scene
this.fillFromLight( light );
this.id = light.id;
this.linkedAsset = light;
+ IEventDispatcher( this.linkedAsset ).addEventListener( PropertyChangeEvent.PROPERTY_CHANGE, linkedAsset_propertyChangeHandler );
+ }
+
+ private function linkedAsset_propertyChangeHandler( event:PropertyChangeEvent ):void
+ {
+ this.fillFromLight( linkedAsset as LightVO );
}
public var linkedAsset:AssetVO;
@@ -192,7 +192,7 @@
<s:BitmapImage source="{getStyle('icon')}"/>
- <s:Label id="labelDisplay" text="{(data is IShared)?IShared(data).linkedAsset.name:data.name}" color.selected="0xFFFFFF" color.hovered="0xEEEEEE" paddingTop="2" paddingLeft="3" />
+ <s:Label id="labelDisplay" text="{data.name}" color.selected="0xFFFFFF" color.hovered="0xEEEEEE" paddingTop="2" paddingLeft="3" />
</s:HGroup>

0 comments on commit 277dabc

Please sign in to comment.