diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 072b74e23..7ffb033cd 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -1028,7 +1028,7 @@ void GUI_App::post_init() BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " sync_user_preset: false"; } - std::string open_method = "studio"; + m_open_method = "double_click"; bool switch_to_3d = false; if (!this->init_params->input_files.empty()) { @@ -1053,7 +1053,7 @@ void GUI_App::post_init() if (!download_url.empty()) { m_download_file_url = from_u8(download_url); } - open_method = "makerworld"; + m_open_method = "makerworld"; } else { switch_to_3d = true; @@ -1061,7 +1061,7 @@ void GUI_App::post_init() mainframe->select_tab(size_t(MainFrame::tp3DEditor)); plater_->select_view_3D("3D"); this->plater()->load_gcode(from_u8(this->init_params->input_files.front())); - open_method = "gcode"; + m_open_method = "gcode"; } else { mainframe->select_tab(size_t(MainFrame::tp3DEditor)); @@ -1076,27 +1076,17 @@ void GUI_App::post_init() if (!input_files.empty()) { std::string file_path = input_files.front().ToStdString(); std::filesystem::path path(file_path); - open_method = "file_" + path.extension().string(); + m_open_method = "file_" + path.extension().string(); } } catch (...) { 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 bool slow_bootup = false; if (app_config->get("slow_bootup") == "true") { @@ -4195,6 +4185,7 @@ void GUI_App::check_track_enable() /* record studio start event */ json j; j["user_mode"] = this->get_mode_str(); + j["open_method"] = m_open_method; if (m_agent) { m_agent->track_event("studio_launch", j.dump()); } diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp index 3a824502b..5ab2cb090 100644 --- a/src/slic3r/GUI/GUI_App.hpp +++ b/src/slic3r/GUI/GUI_App.hpp @@ -654,6 +654,7 @@ private: bool m_datadir_redefined { false }; std::string m_older_data_dir_path; boost::optional m_last_config_version; + std::string m_open_method; }; DECLARE_APP(GUI_App) diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 64d2faba8..d0954edfd 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -483,8 +483,8 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_ agent->track_get_property("auto_arrange", value); j["auto_arrange"] = value; value = ""; - agent->track_get_property("split_to_object", value); - j["split_to_object"] = value; + agent->track_get_property("split_to_objects", value); + j["split_to_objects"] = value; value = ""; agent->track_get_property("split_to_part", value); j["split_to_part"] = value; diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 28af7fc80..df9731e31 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -8199,6 +8199,7 @@ void Plater::priv::record_start_print_preset(std::string action) { // record start print preset try { json j; + j["user_mode"] = wxGetApp().get_mode_str(); int plate_count = partplate_list.get_plate_count(); j["plate_count"] = plate_count; unsigned int obj_count = model.objects.size();