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

@@ -1480,10 +1480,12 @@ Here's a list of what's available in this release.
<icon icon="bug" width="20"/>
<text id="menu-label" text="What's new?" margin="0 0 0 5"/>
</button-custom>
<!--
<button-custom id="about-crash" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
<icon icon="bug" width="20"/>
<text id="menu-label" text="Induce crash" margin="0 0 0 5"/>
</button-custom>
-->
<button-custom id="about-perf" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
<icon icon="bug" width="20"/>
<text id="menu-label" text="Performance test" margin="0 0 0 5"/>

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()