diff options
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r-- | src/mainwin.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc index d1a84d2..b277d1f 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -344,6 +344,13 @@ MainWindow::~MainWindow() #endif } +#ifdef USE_PROGRESSWIDGET +void MainWindow::showProgress() +{ + this->statusBar()->addPermanentWidget(qobject_cast<ProgressWidget*>(sender())); +} +#endif + static void report_func(const class AbstractNode*, void *vp, int mark) { #ifdef USE_PROGRESSWIDGET @@ -651,7 +658,7 @@ void MainWindow::compileCSG(bool procevents) ProgressWidget *pd = new ProgressWidget(this); pd->setRange(0, 100); pd->setValue(0); - this->statusBar()->addPermanentWidget(pd); + connect(pd, SIGNAL(requestShow()), this, SLOT(showProgress())); #else QProgressDialog *pd = new QProgressDialog("Rendering CSG products...", "Cancel", 0, 100); pd->setRange(0, 100); @@ -1057,7 +1064,7 @@ void MainWindow::actionRenderCGAL() ProgressWidget *pd = new ProgressWidget(this); pd->setRange(0, 100); pd->setValue(0); - this->statusBar()->addPermanentWidget(pd); + connect(pd, SIGNAL(requestShow()), this, SLOT(showProgress())); #else QProgressDialog *pd = new QProgressDialog("Rendering Polygon Mesh using CGAL...", "Cancel", 0, 100); pd->setRange(0, 100); |