mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
suppress: gtk_style_context_add_provider: assertion 'GTK_IS_STYLE_CONTEXT (context)' failed
This commit is contained in:
@@ -2708,11 +2708,15 @@ bool GUI_App::on_init_inner()
|
|||||||
|
|
||||||
#if defined(__WXGTK20__) || defined(__WXGTK3__)
|
#if defined(__WXGTK20__) || defined(__WXGTK3__)
|
||||||
// Suppress harmless GTK critical warnings from the GTK3/wxWidgets interaction.
|
// Suppress harmless GTK critical warnings from the GTK3/wxWidgets interaction.
|
||||||
// These include widget allocation on hidden widgets and events on unrealized widgets.
|
// These include widget allocation on hidden widgets, events on unrealized widgets,
|
||||||
|
// and style context operations during widget construction (SetBackgroundColour
|
||||||
|
// before GTK widget realization).
|
||||||
g_log_set_handler("Gtk", G_LOG_LEVEL_CRITICAL,
|
g_log_set_handler("Gtk", G_LOG_LEVEL_CRITICAL,
|
||||||
[](const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) {
|
[](const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) {
|
||||||
if (message && (strstr(message, "gtk_widget_set_allocation") ||
|
if (message && (strstr(message, "gtk_widget_set_allocation") ||
|
||||||
strstr(message, "WIDGET_REALIZED_FOR_EVENT")))
|
strstr(message, "WIDGET_REALIZED_FOR_EVENT") ||
|
||||||
|
strstr(message, "gtk_widget_get_style_context") ||
|
||||||
|
strstr(message, "gtk_style_context_add_provider")))
|
||||||
return;
|
return;
|
||||||
g_log_default_handler(log_domain, log_level, message, user_data);
|
g_log_default_handler(log_domain, log_level, message, user_data);
|
||||||
}, nullptr);
|
}, nullptr);
|
||||||
|
|||||||
Reference in New Issue
Block a user