FIX: the logic of buried points that were not buried

JIRA: none

Signed-off-by: Kunlong Ma <kunlong.ma@bambulab.com>
Change-Id: Id95174659c5fce7feba409eb5e14916608745fa4
This commit is contained in:
Kunlong Ma 2024-01-17 11:02:02 +08:00 committed by lane.wei
parent 6cbd63bac4
commit 96732cd320
4 changed files with 10 additions and 17 deletions

View File

@ -1028,7 +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"; m_open_method = "double_click";
bool switch_to_3d = false; bool switch_to_3d = false;
if (!this->init_params->input_files.empty()) { if (!this->init_params->input_files.empty()) {
@ -1053,7 +1053,7 @@ void GUI_App::post_init()
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"; m_open_method = "makerworld";
} }
else { else {
switch_to_3d = true; switch_to_3d = true;
@ -1061,7 +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"; m_open_method = "gcode";
} }
else { else {
mainframe->select_tab(size_t(MainFrame::tp3DEditor)); mainframe->select_tab(size_t(MainFrame::tp3DEditor));
@ -1076,27 +1076,17 @@ void GUI_App::post_init()
if (!input_files.empty()) { if (!input_files.empty()) {
std::string file_path = input_files.front().ToStdString(); std::string file_path = input_files.front().ToStdString();
std::filesystem::path path(file_path); std::filesystem::path path(file_path);
open_method = "file_" + path.extension().string(); m_open_method = "file_" + path.extension().string();
} }
} }
catch (...) { catch (...) {
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ", file path exception!"; BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ", file path exception!";
open_method = "file"; m_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;
if (app_config->get("slow_bootup") == "true") { if (app_config->get("slow_bootup") == "true") {
@ -4195,6 +4185,7 @@ void GUI_App::check_track_enable()
/* record studio start event */ /* record studio start event */
json j; json j;
j["user_mode"] = this->get_mode_str(); j["user_mode"] = this->get_mode_str();
j["open_method"] = m_open_method;
if (m_agent) { if (m_agent) {
m_agent->track_event("studio_launch", j.dump()); m_agent->track_event("studio_launch", j.dump());
} }

View File

@ -654,6 +654,7 @@ private:
bool m_datadir_redefined { false }; bool m_datadir_redefined { false };
std::string m_older_data_dir_path; std::string m_older_data_dir_path;
boost::optional<Semver> m_last_config_version; boost::optional<Semver> m_last_config_version;
std::string m_open_method;
}; };
DECLARE_APP(GUI_App) DECLARE_APP(GUI_App)

View File

@ -483,8 +483,8 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
agent->track_get_property("auto_arrange", value); agent->track_get_property("auto_arrange", value);
j["auto_arrange"] = value; j["auto_arrange"] = value;
value = ""; value = "";
agent->track_get_property("split_to_object", value); agent->track_get_property("split_to_objects", value);
j["split_to_object"] = value; j["split_to_objects"] = value;
value = ""; value = "";
agent->track_get_property("split_to_part", value); agent->track_get_property("split_to_part", value);
j["split_to_part"] = value; j["split_to_part"] = value;

View File

@ -8199,6 +8199,7 @@ void Plater::priv::record_start_print_preset(std::string action) {
// record start print preset // record start print preset
try { try {
json j; json j;
j["user_mode"] = wxGetApp().get_mode_str();
int plate_count = partplate_list.get_plate_count(); int plate_count = partplate_list.get_plate_count();
j["plate_count"] = plate_count; j["plate_count"] = plate_count;
unsigned int obj_count = model.objects.size(); unsigned int obj_count = model.objects.size();