Skip to content

Commit

Permalink
Merge pull request #341 from Modorganizer2/Develop
Browse files Browse the repository at this point in the history
Reset the progress bar data after completing the extraction
  • Loading branch information
Silarn authored May 8, 2018
2 parents 0da6af1 + 632474e commit 5e6bb0a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/installationmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ bool InstallationManager::unpackSingleFile(const QString &fileName)
m_InstallationProgress->hide();
m_InstallationProgress->deleteLater();
m_InstallationProgress = nullptr;
m_Progress = 0;
});
m_InstallationProgress->setWindowFlags(
m_InstallationProgress->windowFlags() & ~Qt::WindowContextHelpButtonHint);
Expand All @@ -202,8 +203,6 @@ bool InstallationManager::unpackSingleFile(const QString &fileName)
do {
if (m_Progress != m_InstallationProgress->value())
m_InstallationProgress->setValue(m_Progress);
if (m_ProgressFile != m_InstallationProgress->labelText())
m_InstallationProgress->setLabelText(m_ProgressFile);
QCoreApplication::processEvents();
} while (!future.isFinished() || m_InstallationProgress->isVisible());
bool res = future.result();
Expand Down Expand Up @@ -283,6 +282,7 @@ QStringList InstallationManager::extractFiles(const QStringList &filesOrig, bool
m_InstallationProgress->hide();
m_InstallationProgress->deleteLater();
m_InstallationProgress = nullptr;
m_Progress = 0;
});
m_InstallationProgress->setWindowFlags(
m_InstallationProgress->windowFlags() & (~Qt::WindowContextHelpButtonHint));
Expand All @@ -303,8 +303,6 @@ QStringList InstallationManager::extractFiles(const QStringList &filesOrig, bool
do {
if (m_Progress != m_InstallationProgress->value())
m_InstallationProgress->setValue(m_Progress);
if (m_ProgressFile != m_InstallationProgress->labelText())
m_InstallationProgress->setLabelText(m_ProgressFile);
QCoreApplication::processEvents();
} while (!future.isFinished() || m_InstallationProgress->isVisible());
if (!future.result()) {
Expand Down Expand Up @@ -584,6 +582,8 @@ bool InstallationManager::doInstall(GuessedValue<QString> &modName, QString game
m_InstallationProgress->hide();
m_InstallationProgress->deleteLater();
m_InstallationProgress = nullptr;
m_Progress = 0;
m_ProgressFile = QString();
});

m_InstallationProgress->setWindowFlags(
Expand Down

0 comments on commit 5e6bb0a

Please sign in to comment.