r5408 - trunk/eda/fped
werner at docs.openmoko.org
werner at docs.openmoko.org
Sat Aug 8 21:01:45 CEST 2009
Author: werner
Date: 2009-08-08 21:01:45 +0200 (Sat, 08 Aug 2009)
New Revision: 5408
Modified:
trunk/eda/fped/gui_canvas.c
Log:
- zoom and center changed the coordinate system and did a redraw while
hovering, upsetting the overlays
Modified: trunk/eda/fped/gui_canvas.c
===================================================================
--- trunk/eda/fped/gui_canvas.c 2009-08-08 18:50:17 UTC (rev 5407)
+++ trunk/eda/fped/gui_canvas.c 2009-08-08 19:01:45 UTC (rev 5408)
@@ -190,8 +190,10 @@
redraw();
break;
case 2:
+ tool_dehover();
draw_ctx.center = pos;
redraw();
+ tool_hover(canvas_to_coord(event->x, event->y));
break;
}
return TRUE;
@@ -228,11 +230,13 @@
{
if (draw_ctx.scale < 2)
return;
+ tool_dehover();
draw_ctx.scale /= 2;
draw_ctx.center.x = (draw_ctx.center.x+pos.x)/2;
draw_ctx.center.y = (draw_ctx.center.y+pos.y)/2;
update_zoom();
redraw();
+ tool_hover(pos);
}
@@ -248,11 +252,13 @@
bbox.max.x < draw_ctx.widget->allocation.width-ZOOM_STOP_BORDER &&
bbox.min.y < draw_ctx.widget->allocation.height-ZOOM_STOP_BORDER)
return;
+ tool_dehover();
draw_ctx.scale *= 2;
draw_ctx.center.x = 2*draw_ctx.center.x-pos.x;
draw_ctx.center.y = 2*draw_ctx.center.y-pos.y;
update_zoom();
redraw();
+ tool_hover(pos);
}
@@ -296,18 +302,24 @@
zoom_out(pos);
break;
case '*':
+ tool_dehover();
center(NULL);
auto_scale(NULL);
redraw();
+ tool_hover(canvas_to_coord(curr_pos.x, curr_pos.y));
break;
case '#':
+ tool_dehover();
center(&active_frame_bbox);
auto_scale(&active_frame_bbox);
redraw();
+ tool_hover(canvas_to_coord(curr_pos.x, curr_pos.y));
break;
case '.':
+ tool_dehover();
draw_ctx.center = pos;
redraw();
+ tool_hover(canvas_to_coord(curr_pos.x, curr_pos.y));
break;
case GDK_BackSpace:
case GDK_Delete:
More information about the commitlog
mailing list