GUI: early return

This commit is contained in:
Daniel Marjamäki 2018-02-20 13:10:36 +01:00
parent 31399e556b
commit b1ae56736d
1 changed files with 10 additions and 10 deletions

View File

@ -1106,16 +1106,16 @@ void MainWindow::openResults()
void MainWindow::loadResults(const QString selectedFile)
{
if (!selectedFile.isEmpty()) {
if (mProjectFile)
closeProjectFile();
mIsLogfileLoaded = true;
mUI.mResults->clear(true);
mUI.mActionReanalyzeModified->setEnabled(false);
mUI.mActionReanalyzeAll->setEnabled(false);
mUI.mResults->readErrorsXml(selectedFile);
setPath(SETTINGS_LAST_RESULT_PATH, selectedFile);
}
if (selectedFile.isEmpty())
return;
if (mProjectFile)
closeProjectFile();
mIsLogfileLoaded = true;
mUI.mResults->clear(true);
mUI.mActionReanalyzeModified->setEnabled(false);
mUI.mActionReanalyzeAll->setEnabled(false);
mUI.mResults->readErrorsXml(selectedFile);
setPath(SETTINGS_LAST_RESULT_PATH, selectedFile);
}
void MainWindow::loadResults(const QString selectedFile, const QString sourceDirectory)