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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user