From b30072d100aa3f6a8869555816e0bbfa399920d1 Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Sun, 24 Mar 2019 13:14:53 -0400 Subject: [PATCH] Prevent animations from playing while switching tabs --- .vs/Switch_Toolbox/v15/.suo | Bin 526848 -> 530432 bytes .../Forms/Editors/AnimationPanel.cs | 2 ++ Toolbox/MainForm.cs | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index d3ff343cad40e58823698f5840b3582a13558c2e..08b320260fdf309f993b25c6f83db5bc7c2dc215 100644 GIT binary patch delta 5236 zcmeHKeOQ#owSQ;ccjjFd#03FSiCKA&8vI%m2_oW3h&47bXaU6%l`loFA}(MpT38Yr ztx*Du@%Y^9lOpOGKZ3yKVKg!6hNwwsVoYjolg4W-G1~YMu@z$sg?rxRLz6bQH~s7W zaYui9&YUxIX3m^*<{g~dtj-2&RlSwCimF$d5pTAUI+# z4*MHwMvDw>Sf0U!qSS&g_$Z{~dwK74{E5bXA8$}U?1z0v7SuauQm_04T*YuL2K$3V z){H^bRhnqmg1E8B3Fye(wCg6~< zh8>b1=9s3f9E1IVh{*`!7!9)q`r1g8jYAAU7<=oJ8~dJyX8ZaE?VB5qxID-p{P|AttB zFvb)hUDeAQeRqRz0`PrtCbVwl@Gu$Ykf?hZ>gA%*Uaz;Z(3 zMM+ROnJhZ+H%^oUmvaxgblXSV8B|JAMM+3G`Kebq(@;`>;=VPwi;y&T$B?HejcF96 zVRy(jQF327sdjhV*X={5h>joq#Jiyyv?LJ59z;snA<)&NcSNoBEKK$0R++92V#?m)``5k{XvTsX;`KhTou6( z*zNY|r3P;_v*xb%{UfPMq;&~YtLZ8SS|M)1WZk zyA>U&u~lPhW`sXNblP$os|ra|G6v@%cgYja(7IGAoK}n5vLII_TSdteTj9(Wo+|3M zCAzmQUO{SRnuKZoTjZp8fBwXP7TmI7w67f&!5Py?ok+_#*yKniB01++T{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AX2UWeTI#!;p)LO8LED(SE#XAtMmawl(%rrOQ;Qy6PSQ%q1 z)q2C$CrK3e{n`MTTBlVC{hia(%x`nfkg`N%ZV@Gog-bb#(t`;N4xt?-cLxkS~a*QuqQQR(kc*#T?SNI_7v= zLMjO?SdVXUG#Uk3kmWoNoO4+2;E`anT5j!oU)kJ+Gv*BKt_CL}UO4dF!bv@DYhC!@ z{?Oo7@CRAqw1<`Zlrm*5bcI+(TDwb39DZlSD~8=dY(JP&y;|g%|0rOQC=Qf~%)oVN Vj>*!ew+}SSR`m6vL|V1c{{%u#^7jA$ diff --git a/Switch_Toolbox_Library/Forms/Editors/AnimationPanel.cs b/Switch_Toolbox_Library/Forms/Editors/AnimationPanel.cs index cd03152b..bc83e680 100644 --- a/Switch_Toolbox_Library/Forms/Editors/AnimationPanel.cs +++ b/Switch_Toolbox_Library/Forms/Editors/AnimationPanel.cs @@ -366,6 +366,8 @@ namespace Switch_Toolbox.Library Dispose(); } + + private void AnimationPanel_Load(object sender, EventArgs e) { Viewport viewport = LibraryGUI.Instance.GetActiveViewport(); diff --git a/Toolbox/MainForm.cs b/Toolbox/MainForm.cs index 89f18091..b07b2da8 100644 --- a/Toolbox/MainForm.cs +++ b/Toolbox/MainForm.cs @@ -584,7 +584,7 @@ namespace Toolbox } else if (ActiveMdiChild is ImageEditorForm) { - return ((ImageEditorForm)ActiveMdiChild).GetActiveFile(); + return ((ImageEditorForm)ActiveMdiChild).GetActiveFile(); } else if (ActiveMdiChild is AudioPlayer) { @@ -715,7 +715,7 @@ namespace Toolbox private void settingsToolStripMenuItem_Click(object sender, EventArgs e) { - + } private void MainForm_DragEnter(object sender, DragEventArgs e) @@ -765,6 +765,14 @@ namespace Toolbox } } + private void ResetAnimPanel() + { + if (LibraryGUI.Instance.GetAnimationPanel() != null) + { + LibraryGUI.Instance.GetAnimationPanel().CurrentAnimation = null; + } + } + private void MainForm_MdiChildActivate(object sender, EventArgs e) { if (this.ActiveMdiChild == null) @@ -775,6 +783,8 @@ namespace Toolbox // If no any child form, hide tabControl else { + ResetAnimPanel(); + // If child form is new and no has tabPage, // create new tabPage if (this.ActiveMdiChild.Tag == null)