]> git.street.me.uk Git - andy/viking.git/blobdiff - src/viktrwlayer.c
Open picture associated with a waypoint on double click by the select tool.
[andy/viking.git] / src / viktrwlayer.c
index 61c072030de5012ec39f6941e6a7fd983c8f39a8..091607cc2741900447b52d4fd9f01e19104ba878 100644 (file)
@@ -8670,6 +8670,15 @@ static gboolean trw_layer_select_click ( VikTrwLayer *vtl, GdkEventButton *event
       vtl->current_wp =    wp_params.closest_wp;
       vtl->current_wp_id = wp_params.closest_wp_id;
 
+      if ( event->type == GDK_2BUTTON_PRESS ) {
+        if ( vtl->current_wp->image ) {
+          menu_array_sublayer values;
+          values[MA_VTL] = vtl;
+          values[MA_MISC] = vtl->current_wp->image;
+          trw_layer_show_picture ( values );
+        }
+      }
+
       vik_layer_emit_update ( VIK_LAYER(vtl) );
 
       return TRUE;