Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Hide progress bar text when no file is opened
Browse files Browse the repository at this point in the history
This prevents progress bar from displaying that 1 rule is selected even
though no file has been opened yet.
  • Loading branch information
Martin Preisler committed Feb 5, 2015
1 parent 43e03c7 commit ad8cc3e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,12 @@ void MainWindow::clearResults()
{
struct xccdf_policy* policy = mScanningSession != 0 ? xccdf_session_get_xccdf_policy(mScanningSession->getXCCDFSession()) : 0;
mUI.progressBar->setRange(0, policy ? xccdf_policy_get_selected_rules_count(policy) : 1);
mUI.progressBar->setTextVisible(true);
}
else
{
mUI.progressBar->setRange(0, 1);
mUI.progressBar->setTextVisible(false);
}

mUI.progressBar->reset();
Expand Down Expand Up @@ -468,6 +470,7 @@ void MainWindow::scanAsync(ScannerMode scannerMode)
mUI.progressBar->reset();
mUI.progressBar->setValue(0);
mUI.progressBar->setEnabled(true);
mUI.progressBar->setTextVisible(true);
mUI.ruleResultsTree->setEnabled(true);

mScanThread = new QThread(this);
Expand Down

0 comments on commit ad8cc3e

Please sign in to comment.