implement multithreading for windows, implement file uploading when saving
This commit is contained in:
@@ -1213,6 +1213,10 @@ void ui::Canvas::project_save_thread(std::string data_path)
|
||||
}
|
||||
fclose(fp);
|
||||
LOG("project saved to %s", data_path.c_str());
|
||||
|
||||
App::I.upload(data_path);
|
||||
LOG("uploaded");
|
||||
|
||||
App::I.async_start();
|
||||
pb->destroy();
|
||||
App::I.async_update();
|
||||
@@ -1284,7 +1288,6 @@ void ui::Canvas::project_open_thread(std::string data_path)
|
||||
{
|
||||
int n_order;
|
||||
fread(&n_order, sizeof(int), 1, fp);
|
||||
m_order.push_back(n_order);
|
||||
|
||||
int name_len;
|
||||
fread(&name_len, sizeof(int), 1, fp);
|
||||
@@ -1327,6 +1330,7 @@ void ui::Canvas::project_open_thread(std::string data_path)
|
||||
m_layers.emplace_back();
|
||||
m_layers.back().create(m_width, m_height, name.c_str());
|
||||
m_layers.back().restore(snap);
|
||||
m_order.push_back(n_order);
|
||||
App::I.async_end();
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
Reference in New Issue
Block a user