diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 510b18c8f..e43adc9a3 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -1030,7 +1030,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()) { @@ -1055,7 +1055,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; @@ -1063,7 +1063,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)); @@ -1078,27 +1078,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") { @@ -4228,6 +4218,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 cff5deeb5..9ee6ea756 100644 --- a/src/slic3r/GUI/GUI_App.hpp +++ b/src/slic3r/GUI/GUI_App.hpp @@ -656,6 +656,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 07105ab39..b3ead3b23 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -489,7 +489,7 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_ j["auto_orient"] = get_value("auto_orient"); j["auto_arrange"] = get_value("auto_arrange"); - j["split_to_object"] = get_value("split_to_object"); + j["split_to_objects"] = get_value("split_to_objects"); j["split_to_part"] = get_value("split_to_part"); j["custom_height"] = get_value("custom_height"); j["move"] = get_value(get_name_from_gizmo_etype(GLGizmosManager::EType::Move)); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 251299f0c..1d2970244 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -8258,6 +8258,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();