Exemplo n.º 1
0
        public override void Append(UndoRedoAction action, bool performAction)
        {
            base.Append(action, performAction);
            SetAtlasRectAction atlasAction = action as SetAtlasRectAction;

            if (performAction)
            {
                atlasAction.originalRect = this.originalRect;
                atlasAction.Do();
            }
            this.rect = atlasAction.rect;
        }
Exemplo n.º 2
0
        public override bool CanAppend(UndoRedoAction action)
        {
            SetAtlasRectAction atlasAction = action as SetAtlasRectAction;

            if (atlasAction == null)
            {
                return(false);
            }
            if (atlasAction.pixmap != this.pixmap)
            {
                return(false);
            }
            if (atlasAction.atlasIndex != this.atlasIndex)
            {
                return(false);
            }
            return(true);
        }