mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
PrintDialog: reset the progress bar each time the dialog opens
This requires us to expose the progressBar as a private class member. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
e4f35fb51a
commit
fc06a69c43
2 changed files with 4 additions and 1 deletions
|
@ -48,7 +48,7 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f)
|
|||
connect(closeButton, SIGNAL(clicked(bool)), this, SLOT(closeClicked()));
|
||||
hLayout->addWidget(closeButton);
|
||||
|
||||
QProgressBar *progressBar = new QProgressBar();
|
||||
progressBar = new QProgressBar();
|
||||
connect(printLayout, SIGNAL(signalProgress(int)), progressBar, SLOT(setValue(int)));
|
||||
progressBar->setMinimum(0);
|
||||
progressBar->setMaximum(100);
|
||||
|
@ -64,6 +64,7 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f)
|
|||
|
||||
void PrintDialog::runDialog()
|
||||
{
|
||||
progressBar->setValue(0);
|
||||
exec();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue