/// <summary> /// Adds the given Animation into the current bundle /// </summary> /// <param name="anim">The animation to add to the bundle</param> /// <param name="openOnForm">Whether to open the newly added animation on the main form</param> /// <param name="parentSheet">Optional AnimationSheet that will own the newly created animation</param> public void AddAnimation(Animation anim, bool openOnForm, AnimationSheet parentSheet = null) { CurrentBundle.AddAnimation(anim, parentSheet); if (openOnForm) { _mainForm.AddAnimation(anim, true); _mainForm.OpenViewForAnimation(anim); } else { _mainForm.AddAnimation(anim); } AnimationAdded?.Invoke(this, new AnimationEventArgs(anim)); MarkUnsavedChanges(true); }
private void OnAnimationAdded(AnimationAdded msg) { AddAnimation(msg.AnimationId, msg.Name); }