- /* Enable click to apply callback to potentially all track/waypoint layers */
- /* Useful as we can find things that aren't necessarily in the currently selected layer */
- GList* gl = vik_layers_panel_get_all_layers_of_type ( t->vw->viking_vlp, VIK_LAYER_TRW, FALSE ); // Don't get invisible layers
- clicker ck;
- ck.cont = TRUE;
- ck.vvp = t->vw->viking_vvp;
- ck.event = event;
- ck.tool_edit = t;
- g_list_foreach ( gl, (GFunc) click_layer_selected, &ck );
- g_list_free ( gl );
-
- // If nothing found then deselect & redraw screen if necessary to remove the highlight
- if ( ck.cont ) {
- GtkTreeIter iter;
- VikTreeview *vtv = vik_layers_panel_get_treeview ( t->vw->viking_vlp );
-
- if ( vik_treeview_get_selected_iter ( vtv, &iter ) ) {
- // Only clear if selected thing is a TrackWaypoint layer or a sublayer
- gint type = vik_treeview_item_get_type ( vtv, &iter );
- if ( type == VIK_TREEVIEW_TYPE_SUBLAYER ||
- VIK_LAYER(vik_treeview_item_get_pointer ( vtv, &iter ))->type == VIK_LAYER_TRW ) {
+
+ if ( event->state & VIK_MOVE_MODIFIER )
+ vik_window_pan_click ( t->vw, event );
+ else {
+ /* Enable click to apply callback to potentially all track/waypoint layers */
+ /* Useful as we can find things that aren't necessarily in the currently selected layer */
+ GList* gl = vik_layers_panel_get_all_layers_of_type ( t->vw->viking_vlp, VIK_LAYER_TRW, FALSE ); // Don't get invisible layers
+ clicker ck;
+ ck.cont = TRUE;
+ ck.vvp = t->vw->viking_vvp;
+ ck.event = event;
+ ck.tool_edit = t;
+ g_list_foreach ( gl, (GFunc) click_layer_selected, &ck );
+ g_list_free ( gl );
+
+ // If nothing found then deselect & redraw screen if necessary to remove the highlight
+ if ( ck.cont ) {
+ GtkTreeIter iter;
+ VikTreeview *vtv = vik_layers_panel_get_treeview ( t->vw->viking_vlp );
+
+ if ( vik_treeview_get_selected_iter ( vtv, &iter ) ) {
+ // Only clear if selected thing is a TrackWaypoint layer or a sublayer
+ gint type = vik_treeview_item_get_type ( vtv, &iter );
+ if ( type == VIK_TREEVIEW_TYPE_SUBLAYER ||
+ VIK_LAYER(vik_treeview_item_get_pointer ( vtv, &iter ))->type == VIK_LAYER_TRW ) {