Don't open new window if user canceled opening file.

--HG--
branch : develop
This commit is contained in:
dismine 2014-12-12 11:56:26 +02:00
parent dd0d3faae6
commit 3293916d50

View File

@ -1411,6 +1411,10 @@ void MainWindow::Open()
} }
qCDebug(vMainWindow)<<"Run QFileDialog::getOpenFileName: dir ="<<dir<<"."; qCDebug(vMainWindow)<<"Run QFileDialog::getOpenFileName: dir ="<<dir<<".";
const QString filePath = QFileDialog::getOpenFileName(this, tr("Open file"), dir, filter); const QString filePath = QFileDialog::getOpenFileName(this, tr("Open file"), dir, filter);
if (filePath.isEmpty())
{
return;
}
LoadPattern(filePath); LoadPattern(filePath);
} }