Fixed modified dialog showing after a file is saved.

This commit is contained in:
Leonardo Zide 2019-07-14 18:03:17 -07:00
parent 55a0639c78
commit 4293829386

View file

@ -460,11 +460,12 @@ bool Project::Load(const QString& FileName)
bool Project::Save(const QString& FileName)
{
SetFileName(QString());
QFile File(FileName);
if (!File.open(QIODevice::WriteOnly))
{
SetFileName(QString());
QMessageBox::warning(gMainWindow, tr("Error"), tr("Error writing to file '%1':\n%2").arg(FileName, File.errorString()));
return false;
}