]> git.street.me.uk Git - andy/viking.git/commitdiff
SF Bugs#118: Fix route point selection via the Edit Trackpoint tool.
authorRob Norris <rw_norris@hotmail.com>
Mon, 16 Mar 2015 20:52:17 +0000 (20:52 +0000)
committerRob Norris <rw_norris@hotmail.com>
Mon, 16 Mar 2015 20:52:17 +0000 (20:52 +0000)
src/viktrwlayer.c

index 72c89648f5cec74a8d2a52e0e1bd50b349cbea47..f8b46c87bc5131112e36bf08ec401525b2121201 100644 (file)
@@ -10110,6 +10110,8 @@ static gboolean tool_edit_trackpoint_click ( VikTrwLayer *vtl, GdkEventButton *e
     /* first check if it is within range of prev. tp. and if current_tp track is shown. (if it is, we are moving that trackpoint.) */
     VikTrackpoint *tp = VIK_TRACKPOINT(vtl->current_tpl->data);
     VikTrack *current_tr = VIK_TRACK(g_hash_table_lookup(vtl->tracks, vtl->current_tp_id));
+    if ( !current_tr )
+      current_tr = VIK_TRACK(g_hash_table_lookup(vtl->routes, vtl->current_tp_id));
     if ( !current_tr )
       return FALSE;