@@ -1028,7 +1028,7 @@ void GUI_App::post_init()
10281028 BOOST_LOG_TRIVIAL (info) << __FUNCTION__ << " sync_user_preset: false" ;
10291029 }
10301030
1031- std::string open_method = " studio " ;
1031+ m_open_method = " double_click " ;
10321032 bool switch_to_3d = false ;
10331033 if (!this ->init_params ->input_files .empty ()) {
10341034
@@ -1053,15 +1053,15 @@ void GUI_App::post_init()
10531053 if (!download_url.empty ()) {
10541054 m_download_file_url = from_u8 (download_url);
10551055 }
1056- open_method = " makerworld" ;
1056+ m_open_method = " makerworld" ;
10571057 }
10581058 else {
10591059 switch_to_3d = true ;
10601060 if (this ->init_params ->input_gcode ) {
10611061 mainframe->select_tab (size_t (MainFrame::tp3DEditor));
10621062 plater_->select_view_3D (" 3D" );
10631063 this ->plater ()->load_gcode (from_u8 (this ->init_params ->input_files .front ()));
1064- open_method = " gcode" ;
1064+ m_open_method = " gcode" ;
10651065 }
10661066 else {
10671067 mainframe->select_tab (size_t (MainFrame::tp3DEditor));
@@ -1076,27 +1076,17 @@ void GUI_App::post_init()
10761076 if (!input_files.empty ()) {
10771077 std::string file_path = input_files.front ().ToStdString ();
10781078 std::filesystem::path path (file_path);
1079- open_method = " file_" + path.extension ().string ();
1079+ m_open_method = " file_" + path.extension ().string ();
10801080 }
10811081 }
10821082 catch (...) {
10831083 BOOST_LOG_TRIVIAL (error) << __FUNCTION__ << " , file path exception!" ;
1084- open_method = " file" ;
1084+ m_open_method = " file" ;
10851085 }
10861086 }
10871087 }
10881088 }
10891089
1090- try {
1091- NetworkAgent* agent = wxGetApp ().getAgent ();
1092- json j;
1093- j[" open_method" ] = open_method;
1094- if (agent) {
1095- agent->track_event (" open_method" , j.dump ());
1096- }
1097- }
1098- catch (...) {}
1099-
11001090// #if BBL_HAS_FIRST_PAGE
11011091 bool slow_bootup = false ;
11021092 if (app_config->get (" slow_bootup" ) == " true" ) {
@@ -4195,6 +4185,7 @@ void GUI_App::check_track_enable()
41954185 /* record studio start event */
41964186 json j;
41974187 j[" user_mode" ] = this ->get_mode_str ();
4188+ j[" open_method" ] = m_open_method;
41984189 if (m_agent) {
41994190 m_agent->track_event (" studio_launch" , j.dump ());
42004191 }
0 commit comments