SendSystemInfoDialog now opens through CallAfter, GL extensions are sorted

This commit is contained in:
Lukas Matena 2021-09-16 14:48:24 +02:00
parent bdc4c4cf30
commit a49c691241
2 changed files with 5 additions and 3 deletions

View File

@ -669,9 +669,6 @@ void GUI_App::post_init()
if (app_config->get("show_hints") == "1" && ! is_gcode_viewer()) if (app_config->get("show_hints") == "1" && ! is_gcode_viewer())
plater_->get_notification_manager()->push_hint_notification(true); plater_->get_notification_manager()->push_hint_notification(true);
// 'Send system info' dialog
show_send_system_info_dialog_if_needed();
// The extra CallAfter() is needed because of Mac, where this is the only way // The extra CallAfter() is needed because of Mac, where this is the only way
// to popup a modal dialog on start without screwing combo boxes. // to popup a modal dialog on start without screwing combo boxes.
// This is ugly but I honestly found no better way to do it. // This is ugly but I honestly found no better way to do it.
@ -685,6 +682,10 @@ void GUI_App::post_init()
}); });
} }
// 'Send system info' dialog. Again, a CallAfter is needed on mac.
// Without it, GL extensions did not show.
CallAfter([] { show_send_system_info_dialog_if_needed(); });
#ifdef _WIN32 #ifdef _WIN32
// Sets window property to mainframe so other instances can indentify it. // Sets window property to mainframe so other instances can indentify it.
OtherInstanceMessageHandler::init_windows_properties(mainframe, m_instance_hash_int); OtherInstanceMessageHandler::init_windows_properties(mainframe, m_instance_hash_int);

View File

@ -294,6 +294,7 @@ static std::string generate_system_info_json()
std::string extensions_str = gl_get_string_safe(GL_EXTENSIONS, ""); std::string extensions_str = gl_get_string_safe(GL_EXTENSIONS, "");
std::vector<std::string> extensions_list; std::vector<std::string> extensions_list;
boost::split(extensions_list, extensions_str, boost::is_any_of(" "), boost::token_compress_off); boost::split(extensions_list, extensions_str, boost::is_any_of(" "), boost::token_compress_off);
std::sort(extensions_list.begin(), extensions_list.end());
pt::ptree extensions_node; pt::ptree extensions_node;
for (const std::string& s : extensions_list) { for (const std::string& s : extensions_list) {
if (s.empty()) if (s.empty())