diff --git a/.gitignore b/.gitignore index 7f6c42bbf..6c2b9cda6 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ mac/tests/ *.opensdf # unsure about the .sal files. Disable for now. *.sal +*.vcxproj.user # Precompiled Headers *.gch diff --git a/src/Project.cpp b/src/Project.cpp index 6cd3a2560..0457f9869 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -1078,6 +1078,10 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id, AudacityProject::~AudacityProject() { + // Tool manager gives us capture sometimes + if(HasCapture()) + ReleaseMouse(); + if (wxGetApp().GetRecentFiles()) { wxGetApp().GetRecentFiles()->RemoveMenu(mRecentFilesMenu); diff --git a/src/effects/AutoDuck.cpp b/src/effects/AutoDuck.cpp index 0d73d29ca..288fbda40 100644 --- a/src/effects/AutoDuck.cpp +++ b/src/effects/AutoDuck.cpp @@ -631,6 +631,8 @@ EffectAutoDuckPanel::~EffectAutoDuckPanel() { if (mBackgroundBitmap) delete mBackgroundBitmap; + if(HasCapture()) + ReleaseMouse(); } void EffectAutoDuckPanel::ResetControlPoints() diff --git a/src/effects/Equalization.cpp b/src/effects/Equalization.cpp index 79f59cc75..dcd076dcf 100644 --- a/src/effects/Equalization.cpp +++ b/src/effects/Equalization.cpp @@ -2922,6 +2922,9 @@ EqualizationPanel::~EqualizationPanel() delete [] mOuti; if (mOutr) delete [] mOutr; + + if(HasCapture()) + ReleaseMouse(); } void EqualizationPanel::ForceRecalc() diff --git a/src/toolbars/ToolBar.cpp b/src/toolbars/ToolBar.cpp index cb003a489..87a76cf34 100644 --- a/src/toolbars/ToolBar.cpp +++ b/src/toolbars/ToolBar.cpp @@ -112,6 +112,8 @@ ToolBarResizer::ToolBarResizer(ToolBar *bar) ToolBarResizer::~ToolBarResizer() { + if(HasCapture()) + ReleaseMouse(); } /* diff --git a/src/toolbars/ToolManager.cpp b/src/toolbars/ToolManager.cpp index 8cc49b7b2..1cc1f1c19 100644 --- a/src/toolbars/ToolManager.cpp +++ b/src/toolbars/ToolManager.cpp @@ -155,6 +155,12 @@ class ToolFrame final : public wxFrame } } + ~ToolFrame() + { + if(HasCapture()) + ReleaseMouse(); + } + // // Transition a toolbar from float to dragging // diff --git a/src/widgets/AButton.cpp b/src/widgets/AButton.cpp index f7825292a..409bcd963 100644 --- a/src/widgets/AButton.cpp +++ b/src/widgets/AButton.cpp @@ -187,6 +187,8 @@ AButton::AButton(wxWindow * parent, AButton::~AButton() { + if(HasCapture()) + ReleaseMouse(); } void AButton::Init(wxWindow * parent, diff --git a/src/widgets/ASlider.cpp b/src/widgets/ASlider.cpp index 447bdf960..ae9caf97f 100644 --- a/src/widgets/ASlider.cpp +++ b/src/widgets/ASlider.cpp @@ -1618,6 +1618,8 @@ ASlider::ASlider( wxWindow * parent, ASlider::~ASlider() { + if(HasCapture()) + ReleaseMouse(); delete mLWSlider; } diff --git a/src/widgets/Ruler.cpp b/src/widgets/Ruler.cpp index 4eb5b3b3c..ab79256c1 100644 --- a/src/widgets/Ruler.cpp +++ b/src/widgets/Ruler.cpp @@ -1838,6 +1838,9 @@ AdornedRulerPanel::AdornedRulerPanel(AudacityProject* parent, AdornedRulerPanel::~AdornedRulerPanel() { + if(HasCapture()) + ReleaseMouse(); + // Done with the snap manager if (mSnapManager) { delete mSnapManager;