exportdialog: use wait for close code from previous commit when closing the

export dialog
This commit is contained in:
itsmattkc
2020-01-22 19:51:57 +11:00
parent 24f7eeb210
commit a3c932693a
3 changed files with 17 additions and 7 deletions
+7
View File
@@ -258,6 +258,13 @@ void ExportDialog::accept()
QMetaObject::invokeMethod(exporter, "StartExporting", Qt::QueuedConnection);
}
void ExportDialog::closeEvent(QCloseEvent *e)
{
preview_viewer_->ConnectViewerNode(nullptr);
QDialog::closeEvent(e);
}
void ExportDialog::BrowseFilename()
{
const ExportFormat& current_format = formats_.at(format_combobox_->currentIndex());
+3
View File
@@ -21,6 +21,9 @@ public:
public slots:
virtual void accept() override;
protected:
virtual void closeEvent(QCloseEvent *e) override;
private:
void SetUpFormats();
void LoadPresets();
+7 -7
View File
@@ -238,12 +238,6 @@ void RenderBackend::DisconnectViewer(ViewerOutput *node)
void RenderBackend::CacheNext()
{
if (!Init()
|| !ViewerIsConnected()
|| !CanRender()) {
return;
}
if (cache_queue_.isEmpty()) {
if (AllProcessorsAreAvailable()) {
emit QueueComplete();
@@ -252,6 +246,12 @@ void RenderBackend::CacheNext()
return;
}
if (!Init()
|| !ViewerIsConnected()
|| !CanRender()) {
return;
}
if ((input_update_queued_ || recompile_queued_) && !AllProcessorsAreAvailable()) {
return;
}
@@ -333,7 +333,7 @@ void RenderBackend::CancelQueue()
if (processor_busy_state_.at(i))
busy++;
}
qDebug() << this << "has" << busy << "busy workers";
qDebug() << this << "is waiting for" << busy << "busy workers";
cancel_dialog_->RunIfWorkersAreBusy();
}