mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-29 07:50:27 +00:00
Prevent animations from playing while switching tabs
This commit is contained in:
parent
8a352111de
commit
b30072d100
3 changed files with 14 additions and 2 deletions
Binary file not shown.
|
@ -366,6 +366,8 @@ namespace Switch_Toolbox.Library
|
|||
Dispose();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void AnimationPanel_Load(object sender, EventArgs e)
|
||||
{
|
||||
Viewport viewport = LibraryGUI.Instance.GetActiveViewport();
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue