Bug 2609 - Save Project when disk is full gives a second disk-full message
This commit is contained in:
parent
84c60beab6
commit
56c8bdcd24
|
@ -2060,6 +2060,8 @@ bool ProjectFileIO::SaveProject(
|
||||||
reopened = true;
|
reopened = true;
|
||||||
else {
|
else {
|
||||||
MoveProject(fileName, savedName);
|
MoveProject(fileName, savedName);
|
||||||
|
moved = false; // No longer moved
|
||||||
|
|
||||||
reopened = OpenConnection(savedName);
|
reopened = OpenConnection(savedName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2069,7 +2071,12 @@ bool ProjectFileIO::SaveProject(
|
||||||
reopened = OpenConnection(savedName);
|
reopened = OpenConnection(savedName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!reopened)
|
// Warning issued in MoveProject()
|
||||||
|
if (reopened && !moved) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!reopened) {
|
||||||
wxTheApp->CallAfter([this]{
|
wxTheApp->CallAfter([this]{
|
||||||
ShowErrorDialog(nullptr,
|
ShowErrorDialog(nullptr,
|
||||||
XO("Warning"),
|
XO("Warning"),
|
||||||
|
@ -2082,8 +2089,8 @@ bool ProjectFileIO::SaveProject(
|
||||||
mProject.ProcessEvent(evt);
|
mProject.ProcessEvent(evt);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!moved)
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -317,7 +317,7 @@ bool ProjectFileManager::DoSave(const FilePath & fileName, const bool fromSaveAs
|
||||||
if (!success)
|
if (!success)
|
||||||
{
|
{
|
||||||
// Show this error only if we didn't fail reconnection in SaveProject
|
// Show this error only if we didn't fail reconnection in SaveProject
|
||||||
if (projectFileIO.HasConnection())
|
if (!projectFileIO.HasConnection())
|
||||||
ShowErrorDialog(
|
ShowErrorDialog(
|
||||||
&window,
|
&window,
|
||||||
XO("Error Saving Project"),
|
XO("Error Saving Project"),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user