fix: opening a doc async did not update the layers list, added on_complete callback to update the layers panel
This commit is contained in:
@@ -43,7 +43,7 @@ void NodeDialogCloud::loaded()
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::string> split(const std::string& subject, char d)
|
||||
std::vector<std::string> split(const std::string& subject, char d, int max_split = 0)
|
||||
{
|
||||
std::vector<std::string> ret;
|
||||
int start = 0;
|
||||
@@ -52,6 +52,8 @@ std::vector<std::string> split(const std::string& subject, char d)
|
||||
{
|
||||
ret.push_back(subject.substr(start, n - start));
|
||||
start = n + 1;
|
||||
if (max_split && ret.size() == max_split)
|
||||
break;
|
||||
n = subject.find_first_of(d, start);
|
||||
}
|
||||
ret.push_back(subject.substr(start));
|
||||
@@ -77,7 +79,7 @@ void NodeDialogCloud::load_thumbs_thread()
|
||||
std::string url = "http://omigamedev.ddns.net:8080/panoview/cloud-info.php?file=" + n;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
||||
auto err = curl_easy_perform(curl);
|
||||
auto info = split(res, ',');
|
||||
auto info = split(res, ',', 3);
|
||||
int width = atoi(info[0].c_str());
|
||||
int height = atoi(info[1].c_str());
|
||||
int comp = atoi(info[2].c_str());
|
||||
|
||||
Reference in New Issue
Block a user