Commit fee46bda authored by Matthias Clasen's avatar Matthias Clasen

inspector: Fix a thinko

We still need to possibly scan the toplevel after selecting
a widget, since we don't monitor the list of toplevels, so
the window may not be in our tree yet. This was broken in
commit e7bd73f2.
parent af7e73f9
......@@ -208,12 +208,16 @@ static void
select_widget (GtkInspectorWindow *iw,
GtkWidget *widget)
{
GtkInspectorWidgetTree *wt = GTK_INSPECTOR_WIDGET_TREE (iw->widget_tree);
GtkTreeIter iter;
iw->selected_widget = widget;
gtk_notebook_set_current_page (GTK_NOTEBOOK (iw->top_notebook), 0);
gtk_inspector_widget_tree_select_object (GTK_INSPECTOR_WIDGET_TREE (iw->widget_tree),
G_OBJECT (widget));
if (!gtk_inspector_widget_tree_find_object (wt, G_OBJECT (widget), &iter))
gtk_inspector_widget_tree_scan (wt, gtk_widget_get_toplevel (widget));
gtk_inspector_widget_tree_select_object (wt, G_OBJECT (widget));
}
static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment