mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-20 12:39:15 +08:00
NEW: add buried point at the open method
JIRA: NONE Signed-off-by: Kunlong Ma <kunlong.ma@bambulab.com> Change-Id: I2bf4269afc48b53b119a5bda24421d6a7a010379
This commit is contained in:
parent
590dce9d61
commit
f0a484590b
@ -1028,6 +1028,7 @@ void GUI_App::post_init()
|
|||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " sync_user_preset: false";
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " sync_user_preset: false";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string open_method = "studio";
|
||||||
bool switch_to_3d = false;
|
bool switch_to_3d = false;
|
||||||
if (!this->init_params->input_files.empty()) {
|
if (!this->init_params->input_files.empty()) {
|
||||||
|
|
||||||
@ -1045,15 +1046,14 @@ void GUI_App::post_init()
|
|||||||
if ( boost::starts_with(input_str, "http://") || boost::starts_with(input_str, "https://")) {
|
if ( boost::starts_with(input_str, "http://") || boost::starts_with(input_str, "https://")) {
|
||||||
download_url = input_str;
|
download_url = input_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format("download_url %1%") % download_url;
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", download_url %1%") % download_url;
|
||||||
|
|
||||||
if (!download_url.empty()) {
|
if (!download_url.empty()) {
|
||||||
m_download_file_url = from_u8(download_url);
|
m_download_file_url = from_u8(download_url);
|
||||||
}
|
}
|
||||||
|
open_method = "makerworld";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
switch_to_3d = true;
|
switch_to_3d = true;
|
||||||
@ -1061,6 +1061,7 @@ void GUI_App::post_init()
|
|||||||
mainframe->select_tab(size_t(MainFrame::tp3DEditor));
|
mainframe->select_tab(size_t(MainFrame::tp3DEditor));
|
||||||
plater_->select_view_3D("3D");
|
plater_->select_view_3D("3D");
|
||||||
this->plater()->load_gcode(from_u8(this->init_params->input_files.front()));
|
this->plater()->load_gcode(from_u8(this->init_params->input_files.front()));
|
||||||
|
open_method = "gcode";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mainframe->select_tab(size_t(MainFrame::tp3DEditor));
|
mainframe->select_tab(size_t(MainFrame::tp3DEditor));
|
||||||
@ -1071,9 +1072,30 @@ void GUI_App::post_init()
|
|||||||
}
|
}
|
||||||
this->plater()->set_project_filename(_L("Untitled"));
|
this->plater()->set_project_filename(_L("Untitled"));
|
||||||
this->plater()->load_files(input_files);
|
this->plater()->load_files(input_files);
|
||||||
|
try {
|
||||||
|
if (!input_files.empty()) {
|
||||||
|
std::string file_path = input_files.front().ToStdString();
|
||||||
|
std::filesystem::path path(file_path);
|
||||||
|
open_method = "file_" + path.extension().string();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (...) {
|
||||||
|
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ", file path exception!";
|
||||||
|
open_method = "file";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
NetworkAgent* agent = wxGetApp().getAgent();
|
||||||
|
json j;
|
||||||
|
j["open_method"] = open_method;
|
||||||
|
if (agent) {
|
||||||
|
agent->track_event("open_method", j.dump());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (...) {}
|
||||||
|
|
||||||
//#if BBL_HAS_FIRST_PAGE
|
//#if BBL_HAS_FIRST_PAGE
|
||||||
bool slow_bootup = false;
|
bool slow_bootup = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user