single file cloud upload
This commit is contained in:
@@ -383,39 +383,7 @@ void App::init_menu_file()
|
||||
popup->destroy();
|
||||
};
|
||||
popup->find<NodeButtonCustom>("file-save-ver")->on_click = [this](Node*) {
|
||||
if (doc_name.empty())
|
||||
{
|
||||
dialog_save();
|
||||
}
|
||||
else
|
||||
{
|
||||
int current = 0;
|
||||
std::string next = doc_name + ".01";
|
||||
std::string base = doc_name;
|
||||
|
||||
std::regex r(R"((.*)\.(\w{2})$)");
|
||||
std::smatch m;
|
||||
if (std::regex_search(doc_name, m, r))
|
||||
{
|
||||
base = m[1].str();
|
||||
current = atoi(m[2].str().c_str());
|
||||
}
|
||||
|
||||
for (int i = current + 1; i < 99; i++)
|
||||
{
|
||||
static char tmp_name[256];
|
||||
sprintf(tmp_name, "%s.%02d", base.c_str(), i);
|
||||
next = tmp_name;
|
||||
if (Asset::exist(data_path + "/" + next + ".pano", false))
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
doc_name = next;
|
||||
if (auto docname = layout[main_id]->find<NodeText>("txt-docname"))
|
||||
docname->set_text(("Panodoc: " + doc_name).c_str());
|
||||
canvas->m_canvas->project_save(data_path + "/" + next + ".pano");
|
||||
}
|
||||
doc_name.empty() ? dialog_save() : dialog_save_ver();
|
||||
popup->mouse_release();
|
||||
popup->destroy();
|
||||
};
|
||||
@@ -425,7 +393,7 @@ void App::init_menu_file()
|
||||
popup->destroy();
|
||||
};
|
||||
popup->find<NodeButtonCustom>("file-cloud-upload")->on_click = [this](Node*) {
|
||||
cloud_upload_all();
|
||||
cloud_upload();
|
||||
popup->mouse_release();
|
||||
popup->destroy();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user