Prevent animations from playing while switching tabs
This commit is contained in:
parent
8a352111de
commit
b30072d100
Binary file not shown.
@ -366,6 +366,8 @@ namespace Switch_Toolbox.Library
|
|||||||
Dispose();
|
Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void AnimationPanel_Load(object sender, EventArgs e)
|
private void AnimationPanel_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Viewport viewport = LibraryGUI.Instance.GetActiveViewport();
|
Viewport viewport = LibraryGUI.Instance.GetActiveViewport();
|
||||||
|
@ -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)
|
private void MainForm_MdiChildActivate(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (this.ActiveMdiChild == null)
|
if (this.ActiveMdiChild == null)
|
||||||
@ -775,6 +783,8 @@ namespace Toolbox
|
|||||||
// If no any child form, hide tabControl
|
// If no any child form, hide tabControl
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
ResetAnimPanel();
|
||||||
|
|
||||||
// If child form is new and no has tabPage,
|
// If child form is new and no has tabPage,
|
||||||
// create new tabPage
|
// create new tabPage
|
||||||
if (this.ActiveMdiChild.Tag == null)
|
if (this.ActiveMdiChild.Tag == null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user