[Lemon-commits] [lemon_svn] ladanyi: r2160 - hugo/trunk/gui

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:50:37 CET 2006


Author: ladanyi
Date: Tue Aug 23 18:27:59 2005
New Revision: 2160

Modified:
   hugo/trunk/gui/graph_displayer_canvas-event.cc

Log:
bugfix


Modified: hugo/trunk/gui/graph_displayer_canvas-event.cc
==============================================================================
--- hugo/trunk/gui/graph_displayer_canvas-event.cc	(original)
+++ hugo/trunk/gui/graph_displayer_canvas-event.cc	Tue Aug 23 18:27:59 2005
@@ -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())
 		  {



More information about the Lemon-commits mailing list