exporter: add ability to cancel exports (including a confirm to cancel if the
user closes the dialog mid-export)
This commit is contained in:
@@ -31,8 +31,10 @@ bool OpenGLBackend::InitInternal()
|
||||
if (!proxy_->Init()) {
|
||||
proxy_thread->quit();
|
||||
proxy_thread->wait();
|
||||
delete proxy_thread;
|
||||
delete proxy_;
|
||||
proxy_thread->deleteLater();
|
||||
|
||||
proxy_->deleteLater();
|
||||
proxy_ = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -54,7 +56,11 @@ bool OpenGLBackend::InitInternal()
|
||||
void OpenGLBackend::CloseInternal()
|
||||
{
|
||||
if (proxy_) {
|
||||
delete proxy_;
|
||||
proxy_->thread()->quit();
|
||||
proxy_->thread()->wait();
|
||||
proxy_->thread()->deleteLater();
|
||||
|
||||
proxy_->deleteLater();
|
||||
proxy_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ OpenGLProxy::OpenGLProxy(QObject *parent) :
|
||||
|
||||
OpenGLProxy::~OpenGLProxy()
|
||||
{
|
||||
Close();
|
||||
|
||||
surface_.destroy();
|
||||
}
|
||||
|
||||
@@ -178,6 +180,7 @@ void OpenGLProxy::Close()
|
||||
buffer_.Destroy();
|
||||
functions_ = nullptr;
|
||||
delete ctx_;
|
||||
ctx_ = nullptr;
|
||||
}
|
||||
|
||||
void OpenGLProxy::RunNodeAccelerated(const Node *node, const TimeRange &range, const NodeValueDatabase &input_params, NodeValueTable *output_params)
|
||||
|
||||
Reference in New Issue
Block a user