remove all async_start/end calls
This commit is contained in:
@@ -42,11 +42,7 @@ bool NodePanelStroke::import_abr(const std::string& path)
|
||||
if (!str_iequals(ext, "abr") || !Asset::exist(path))
|
||||
return false;
|
||||
|
||||
async_start();
|
||||
auto pb = App::I.show_progress("Importing ABR");
|
||||
app_redraw();
|
||||
async_update();
|
||||
async_end();
|
||||
|
||||
abr.open(path);
|
||||
|
||||
@@ -68,7 +64,6 @@ bool NodePanelStroke::import_abr(const std::string& path)
|
||||
auto thumb = padded.resize(64, 64);
|
||||
thumb.save(path_thumb);
|
||||
|
||||
async_start();
|
||||
NodeButtonBrush* brush = new NodeButtonBrush;
|
||||
m_brush_popup->m_container->add_child(brush);
|
||||
brush->init();
|
||||
@@ -83,9 +78,6 @@ bool NodePanelStroke::import_abr(const std::string& path)
|
||||
count++;
|
||||
float prog = (float)count / (float)tot;
|
||||
pb->m_progress->SetWidthP(prog * 100.f);
|
||||
app_redraw();
|
||||
async_update();
|
||||
async_end();
|
||||
});
|
||||
m_brush_popup->save();
|
||||
|
||||
@@ -101,7 +93,6 @@ bool NodePanelStroke::import_abr(const std::string& path)
|
||||
auto thumb = patt.second->resize(64, 64);
|
||||
thumb.save(path_thumb);
|
||||
|
||||
async_start();
|
||||
NodeButtonBrush* brush = new NodeButtonBrush;
|
||||
m_pattern_popup->m_container->add_child(brush);
|
||||
brush->init();
|
||||
@@ -116,16 +107,12 @@ bool NodePanelStroke::import_abr(const std::string& path)
|
||||
count++;
|
||||
float prog = (float)count / (float)tot;
|
||||
pb->m_progress->SetWidthP(prog * 100.f);
|
||||
app_redraw();
|
||||
async_update();
|
||||
async_end();
|
||||
});
|
||||
m_pattern_popup->save();
|
||||
|
||||
auto brushes = abr.compute_brushes(App::I.data_path);
|
||||
for (const auto& pr : brushes)
|
||||
{
|
||||
async_start();
|
||||
if (pr->valid())
|
||||
{
|
||||
LOG("add preset %s", pr->m_name.c_str());
|
||||
@@ -134,17 +121,10 @@ bool NodePanelStroke::import_abr(const std::string& path)
|
||||
count++;
|
||||
float prog = (float)count / (float)tot;
|
||||
pb->m_progress->SetWidthP(prog * 100.f);
|
||||
app_redraw();
|
||||
async_update();
|
||||
async_end();
|
||||
}
|
||||
|
||||
async_start();
|
||||
App::I.presets->save();
|
||||
pb->destroy();
|
||||
app_redraw();
|
||||
async_update();
|
||||
async_end();
|
||||
//save();
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user