1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Detect failure to reconnect to temp project when first saving it

This commit is contained in:
Paul Licameli
2020-12-06 22:14:54 -05:00
parent 41eb66fccf
commit aa0b33dc8f
5 changed files with 62 additions and 15 deletions

View File

@@ -82,6 +82,8 @@ ProjectManager::ProjectManager( AudacityProject &project )
window.Bind( wxEVT_CLOSE_WINDOW, &ProjectManager::OnCloseWindow, this );
mProject.Bind(EVT_PROJECT_STATUS_UPDATE,
&ProjectManager::OnStatusChange, this);
project.Bind( EVT_RECONNECTION_FAILURE,
&ProjectManager::OnReconnectionFailure, this );
}
ProjectManager::~ProjectManager() = default;
@@ -589,6 +591,14 @@ AudacityProject *ProjectManager::New()
return p;
}
void ProjectManager::OnReconnectionFailure(wxCommandEvent & event)
{
event.Skip();
wxTheApp->CallAfter([this]{
ProjectWindow::Get(mProject).Close(true);
});
}
void ProjectManager::OnCloseWindow(wxCloseEvent & event)
{
auto &project = mProject;