disable crash menu, fix export layers

This commit is contained in:
2019-03-13 11:36:20 +01:00
parent 8f6655254a
commit 1db422ae78
2 changed files with 6 additions and 2 deletions

View File

@@ -1560,6 +1560,8 @@ void Canvas::export_layers(std::string file_name, std::function<void()> on_compl
void Canvas::export_layers_thread(std::string file_name)
{
App::I.async_start();
// save viewport and clear color states
GLint vp[4];
GLfloat cc[4];
@@ -1568,7 +1570,6 @@ void Canvas::export_layers_thread(std::string file_name)
GLboolean blend = glIsEnabled(GL_BLEND);
gl_state gl;
App::I.async_start();
std::shared_ptr<NodeProgressBar> pb;
if (App::I.layout.m_loaded)
{
@@ -1709,13 +1710,14 @@ void Canvas::export_layers_thread(std::string file_name)
pb->destroy();
App::I.async_update();
}
App::I.async_end();
// restore viewport and clear color states
blend ? glEnable(GL_BLEND) : glDisable(GL_BLEND);
glViewport(vp[0], vp[1], vp[2], vp[3]);
glClearColor(cc[0], cc[1], cc[2], cc[3]);
glActiveTexture(GL_TEXTURE0);
App::I.async_end();
}
void Canvas::export_cubes()