Esempio n. 1
0
        protected override void ModifyValue(PropertyReferenceProperty property, object valueToSet, Modification modification, int index)
        {
            if (this.objects.Length == 0)
            {
                using (this.ViewModel.ForceDefaultSetValue())
                    this.parent.SetValue((PropertyReferenceProperty)this.parentProperty, this.parent.GetValue(this.baseReference, PropertyReference.GetValueFlags.Computed));
                this.RebuildObjects();
            }
            bool treeModified = false;
            SceneEditTransaction sceneEditTransaction = (SceneEditTransaction)null;

            try
            {
                sceneEditTransaction = this.parent.PrepareTreeForModifyValue(this.parentProperty.Reference.Append(property.Reference), valueToSet, modification, out treeModified);
                if (treeModified)
                {
                    this.RebuildObjects();
                }
                base.ModifyValue(property, valueToSet, modification, index);
            }
            finally
            {
                if (sceneEditTransaction != null)
                {
                    sceneEditTransaction.Commit();
                    sceneEditTransaction.Dispose();
                }
            }
        }