summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/renderdialog.cc16
-rw-r--r--src/renderdialog.h1
2 files changed, 11 insertions, 6 deletions
diff --git a/src/renderdialog.cc b/src/renderdialog.cc
index 69feaed..758f99e 100644
--- a/src/renderdialog.cc
+++ b/src/renderdialog.cc
@@ -286,10 +286,10 @@ RenderDialog::RenderDialog(QWidget* parent, Project& project)
vl->addLayout(hl);
}
- auto btn = new QPushButton(this);
- btn->setText(tr("Export"));
- connect(btn, SIGNAL(clicked()), this, SLOT(render()));
- layout()->addWidget(btn);
+ export_btn = new QPushButton(this);
+ export_btn->setText(tr("Export"));
+ connect(export_btn, SIGNAL(clicked()), this, SLOT(render()));
+ layout()->addWidget(export_btn);
bar = new QProgressBar(this);
connect(&renderer, SIGNAL(progressStart(int)),
@@ -309,8 +309,10 @@ RenderDialog::RenderDialog(QWidget* parent, Project& project)
delegate = new ProgressDelegate(project, this);
tasks->setItemDelegate(delegate);
-// connect(&renderer, SIGNAL(progressTask(QString)),
-// tasks, SLOT(addItem(QString)));
+ connect(&renderer, SIGNAL(progressStart(int)),
+ this, SLOT(progressStart(int)));
+ connect(&renderer, SIGNAL(progressFinished(int)),
+ this, SLOT(progressFinished(int)));
layout()->addWidget(tasks);
connect(&renderer, SIGNAL(progressTask(QString)),
@@ -327,6 +329,7 @@ void RenderDialog::render()
void RenderDialog::progressStart(int total)
{
+ export_btn->setEnabled(false);
}
void RenderDialog::progressTask(QString text)
@@ -369,6 +372,7 @@ void RenderDialog::progressRenderFinished(int success)
void RenderDialog::progressFinished(int success)
{
+ export_btn->setEnabled(true);
}
void RenderDialog::chooseExportPath()
diff --git a/src/renderdialog.h b/src/renderdialog.h
index f940617..3952c64 100644
--- a/src/renderdialog.h
+++ b/src/renderdialog.h
@@ -62,6 +62,7 @@ private:
ProjectRenderer renderer;
QLineEdit* export_path;
+ QPushButton* export_btn;
QProgressBar* bar;
QTreeView* tasks;