disable crash menu, fix export layers
This commit is contained in:
@@ -1480,10 +1480,12 @@ Here's a list of what's available in this release.
|
|||||||
<icon icon="bug" width="20"/>
|
<icon icon="bug" width="20"/>
|
||||||
<text id="menu-label" text="What's new?" margin="0 0 0 5"/>
|
<text id="menu-label" text="What's new?" margin="0 0 0 5"/>
|
||||||
</button-custom>
|
</button-custom>
|
||||||
|
<!--
|
||||||
<button-custom id="about-crash" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
|
<button-custom id="about-crash" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
|
||||||
<icon icon="bug" width="20"/>
|
<icon icon="bug" width="20"/>
|
||||||
<text id="menu-label" text="Induce crash" margin="0 0 0 5"/>
|
<text id="menu-label" text="Induce crash" margin="0 0 0 5"/>
|
||||||
</button-custom>
|
</button-custom>
|
||||||
|
-->
|
||||||
<button-custom id="about-perf" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
|
<button-custom id="about-perf" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
|
||||||
<icon icon="bug" width="20"/>
|
<icon icon="bug" width="20"/>
|
||||||
<text id="menu-label" text="Performance test" margin="0 0 0 5"/>
|
<text id="menu-label" text="Performance test" margin="0 0 0 5"/>
|
||||||
|
|||||||
@@ -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)
|
void Canvas::export_layers_thread(std::string file_name)
|
||||||
{
|
{
|
||||||
|
App::I.async_start();
|
||||||
|
|
||||||
// save viewport and clear color states
|
// save viewport and clear color states
|
||||||
GLint vp[4];
|
GLint vp[4];
|
||||||
GLfloat cc[4];
|
GLfloat cc[4];
|
||||||
@@ -1568,7 +1570,6 @@ void Canvas::export_layers_thread(std::string file_name)
|
|||||||
GLboolean blend = glIsEnabled(GL_BLEND);
|
GLboolean blend = glIsEnabled(GL_BLEND);
|
||||||
|
|
||||||
gl_state gl;
|
gl_state gl;
|
||||||
App::I.async_start();
|
|
||||||
std::shared_ptr<NodeProgressBar> pb;
|
std::shared_ptr<NodeProgressBar> pb;
|
||||||
if (App::I.layout.m_loaded)
|
if (App::I.layout.m_loaded)
|
||||||
{
|
{
|
||||||
@@ -1709,13 +1710,14 @@ void Canvas::export_layers_thread(std::string file_name)
|
|||||||
pb->destroy();
|
pb->destroy();
|
||||||
App::I.async_update();
|
App::I.async_update();
|
||||||
}
|
}
|
||||||
App::I.async_end();
|
|
||||||
|
|
||||||
// restore viewport and clear color states
|
// restore viewport and clear color states
|
||||||
blend ? glEnable(GL_BLEND) : glDisable(GL_BLEND);
|
blend ? glEnable(GL_BLEND) : glDisable(GL_BLEND);
|
||||||
glViewport(vp[0], vp[1], vp[2], vp[3]);
|
glViewport(vp[0], vp[1], vp[2], vp[3]);
|
||||||
glClearColor(cc[0], cc[1], cc[2], cc[3]);
|
glClearColor(cc[0], cc[1], cc[2], cc[3]);
|
||||||
glActiveTexture(GL_TEXTURE0);
|
glActiveTexture(GL_TEXTURE0);
|
||||||
|
|
||||||
|
App::I.async_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Canvas::export_cubes()
|
void Canvas::export_cubes()
|
||||||
|
|||||||
Reference in New Issue
Block a user