exportdialog: use wait for close code from previous commit when closing the
export dialog
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -21,6 +21,9 @@ public:
|
||||
public slots:
|
||||
virtual void accept() override;
|
||||
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent *e) override;
|
||||
|
||||
private:
|
||||
void SetUpFormats();
|
||||
void LoadPresets();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user