Beispiel #1
0
        static bool SetBlock(ContentBase content, TableBlock block, bool animate)
        {
            // update the model if the object type or the archetype was changed
            bool modelChanged =
                content.Block == null ||
                content.Block.ObjectType != block.ObjectType ||
                content.Block.Archetype != block.Archetype;

            // set reference to block (this one is different than the one passed in the argument because a new copy was create in the undomanager)
            content.Block = block;

            // update transform after block was set
            content.UpdateTransform(animate);

            return(modelChanged);
        }