From: Colin Clark Date: Tue, 24 Aug 2021 14:46:11 +0000 (+0100) Subject: Bug fix: GPS map direction markers X-Git-Tag: v1.7~66 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=c0ebd3622cf15659fa062b69658177ce72756ea7 Bug fix: GPS map direction markers If an image has no GPS direction data, when the GPS map marker was clicked to show the thumbnail, and then clicked to clear it, the image marker was not redisplayed. --- diff --git a/src/bar_gps.c b/src/bar_gps.c index fe2389de..bfcd7b36 100644 --- a/src/bar_gps.c +++ b/src/bar_gps.c @@ -396,8 +396,11 @@ static gboolean bar_pane_gps_marker_keypress_cb(GtkWidget *widget, ClutterButton g_string_free(text, TRUE); parent_marker = clutter_actor_get_parent(label_marker); - direction = clutter_actor_get_child_at_index(parent_marker, 0); - clutter_actor_set_opacity(direction, 255); + if (clutter_actor_get_n_children(parent_marker ) > 1 ) + { + direction = clutter_actor_get_child_at_index(parent_marker, 0); + clutter_actor_set_opacity(direction, 255); + } } /* otherwise, revert to the hidden text marker */ @@ -409,8 +412,11 @@ static gboolean bar_pane_gps_marker_keypress_cb(GtkWidget *widget, ClutterButton champlain_marker_set_selection_text_color(&marker_colour); parent_marker = clutter_actor_get_parent(label_marker); - direction = clutter_actor_get_child_at_index(parent_marker, 0); - clutter_actor_set_opacity(direction, 0); + if (clutter_actor_get_n_children(parent_marker ) > 1 ) + { + direction = clutter_actor_get_child_at_index(parent_marker, 0); + clutter_actor_set_opacity(direction, 0); + } } g_free(current_text);