summaryrefslogtreecommitdiff
path: root/src/mainwin.cc
diff options
context:
space:
mode:
authorkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-02-12 15:43:56 (GMT)
committerkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-02-12 15:43:56 (GMT)
commit594f22e26e74f09c9d9ca8cf4b9e43d5f7998409 (patch)
tree0e4dcc6cfa44fa0c40f36496082a60caa2143d6e /src/mainwin.cc
parent2f74b4abd01d6bd0ccaabfe77bf7ddfc8df4822a (diff)
Delay showing the progress bar with one second
git-svn-id: http://svn.clifford.at/openscad/trunk@438 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r--src/mainwin.cc11
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);
contact: Jan Huwald // Impressum