# HG changeset patch # User ladanyi # Date 1124814479 0 # Node ID d5dc956393b269da80a91e7079e93cae66a468d1 # Parent 2dd083dded66febd94811ba05e28734de479b206 bugfix diff -r 2dd083dded66 -r d5dc956393b2 gui/graph_displayer_canvas-event.cc --- a/gui/graph_displayer_canvas-event.cc Tue Aug 23 15:57:12 2005 +0000 +++ b/gui/graph_displayer_canvas-event.cc Tue Aug 23 16:27:59 2005 +0000 @@ -564,7 +564,8 @@ Edge clicked_edge=INVALID; //find the activated item between texts - active_item=(get_item_at(e->button.x, e->button.y)); + window_to_world (e->button.x, e->button.y, clicked_x, clicked_y); + active_item=(get_item_at(clicked_x, clicked_y)); for (EdgeIt i(mapstorage.graph); i!=INVALID; ++i) { if(edgetextmap[i]==active_item) @@ -576,9 +577,6 @@ //if it was not between texts, search for it between edges if(clicked_edge==INVALID) { - window_to_world (e->button.x, e->button.y, clicked_x, clicked_y); - active_item=(get_item_at(clicked_x, clicked_y)); - for (EdgeIt i(mapstorage.graph); i!=INVALID; ++i) { //at the same time only one can be active @@ -592,7 +590,8 @@ if(clicked_edge!=INVALID) { // the id map is not editable - if (nodemap_to_edit == "id") return 0; + if (edgemap_to_edit == "id") return 0; + //If there is already edited edge, it has to be saved first if(entrywidget.is_visible()) {