X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=radiant%2Fentityinspector.cpp;h=da097e465e8f82e0c4411a813f80deb6c0ba9727;hb=896d2a255aa4dc2c7c132991fbb6c9890acd13fa;hp=a3e445baecf65340d4f814523ac76ea3b2909e93;hpb=12b372f89ce109a4db9d510884fbe7d05af79870;p=xonotic%2Fnetradiant.git diff --git a/radiant/entityinspector.cpp b/radiant/entityinspector.cpp index a3e445ba..da097e46 100644 --- a/radiant/entityinspector.cpp +++ b/radiant/entityinspector.cpp @@ -1010,7 +1010,10 @@ void EntityClassList_selectEntityClass(EntityClass* eclass) GtkTreeView* view = g_entityClassList; GtkTreePath* path = gtk_tree_model_get_path(model, &iter); gtk_tree_selection_select_path(gtk_tree_view_get_selection(view), path); - gtk_tree_view_scroll_to_cell(view, path, 0, FALSE, 0, 0); + if(GTK_WIDGET_REALIZED(view)) + { + gtk_tree_view_scroll_to_cell(view, path, 0, FALSE, 0, 0); + } gtk_tree_path_free(path); good = FALSE; } @@ -1361,7 +1364,10 @@ static gint EntityClassList_keypress(GtkWidget* widget, GdkEventKey* event, gpoi { GtkTreePath* path = gtk_tree_model_get_path(model, &iter); gtk_tree_selection_select_path(gtk_tree_view_get_selection(view), path); - gtk_tree_view_scroll_to_cell(view, path, 0, FALSE, 0, 0); + if(GTK_WIDGET_REALIZED(view)) + { + gtk_tree_view_scroll_to_cell(view, path, 0, FALSE, 0, 0); + } gtk_tree_path_free(path); count = 1; } @@ -1687,7 +1693,8 @@ GtkWidget* EntityInspector_constructWindow(GtkWindow* toplevel) g_entityInspector_windowConstructed = true; EntityClassList_fill(); - GlobalSelectionSystem().addSelectionChangeCallback(FreeCaller1()); + typedef FreeCaller1 EntityInspectorSelectionChangedCaller; + GlobalSelectionSystem().addSelectionChangeCallback(EntityInspectorSelectionChangedCaller()); GlobalEntityCreator().setKeyValueChangedFunc(EntityInspector_keyValueChanged); // hack