396 |
if(map_item_is_selected_way(map, item)) { |
if(map_item_is_selected_way(map, item)) { |
397 |
gint nx, ny; |
gint nx, ny; |
398 |
canvas_window2world(map->canvas, x, y, &nx, &ny); |
canvas_window2world(map->canvas, x, y, &nx, &ny); |
399 |
if(canvas_item_get_segment(item->item, nx, ny) >= 0) |
if(canvas_item_get_segment(item->item, nx, ny) >= 0) |
400 |
map_hl_cursor_draw(map, x, y, FALSE, map->style->node.radius); |
map_hl_cursor_draw(map, x, y, FALSE, map->style->node.radius); |
401 |
} |
} |
402 |
} |
} |
403 |
|
|
404 |
void map_edit_way_node_add(map_t *map, gint x, gint y) { |
void map_edit_way_node_add(map_t *map, gint x, gint y) { |
405 |
/* check if we are still hovering above the selected way */ |
/* check if we are still hovering above the selected way */ |
406 |
map_item_t *item = map_item_at(map, x, y); |
map_item_t *item = map_real_item_at(map, x, y); |
407 |
if(item && map_item_is_selected_way(map, item)) { |
if(item && map_item_is_selected_way(map, item)) { |
408 |
/* convert mouse position to canvas (world) position */ |
/* convert mouse position to canvas (world) position */ |
409 |
canvas_window2world(map->canvas, x, y, &x, &y); |
canvas_window2world(map->canvas, x, y, &x, &y); |
486 |
void map_edit_way_cut(map_t *map, gint x, gint y) { |
void map_edit_way_cut(map_t *map, gint x, gint y) { |
487 |
|
|
488 |
/* check if we are still hovering above the selected way */ |
/* check if we are still hovering above the selected way */ |
489 |
map_item_t *item = map_item_at(map, x, y); |
map_item_t *item = map_real_item_at(map, x, y); |
490 |
if(item && (map_item_is_selected_way(map, item) || |
if(item && (map_item_is_selected_way(map, item) || |
491 |
map_item_is_selected_node(map, item))) { |
map_item_is_selected_node(map, item))) { |
492 |
gboolean cut_at_node = map_item_is_selected_node(map, item); |
gboolean cut_at_node = map_item_is_selected_node(map, item); |