r5756 - trunk/eda/fped
werner at docs.openmoko.org
werner at docs.openmoko.org
Tue Dec 15 21:05:37 CET 2009
Author: werner
Date: 2009-12-15 21:05:37 +0100 (Tue, 15 Dec 2009)
New Revision: 5756
Modified:
trunk/eda/fped/gui.c
Log:
When entering the first vectors, where were a number of display anomalies
such a vectors pointing in the wrong direction. They were caused by overflows
due to inadequate zoom settings.
- gui.c (change_world): if the extents have grown, zoom to extents
Modified: trunk/eda/fped/gui.c
===================================================================
--- trunk/eda/fped/gui.c 2009-12-15 19:33:15 UTC (rev 5755)
+++ trunk/eda/fped/gui.c 2009-12-15 20:05:37 UTC (rev 5756)
@@ -252,12 +252,20 @@
void change_world(void)
{
+ struct bbox before, after;
+
inst_deselect();
status_begin_reporting();
+ before = inst_get_bbox();
instantiate();
+ after = inst_get_bbox();
label_in_box_bg(active_frame->label, COLOR_FRAME_SELECTED);
build_frames(frames_box);
- redraw();
+ if (after.min.x < before.min.x || after.min.y < before.min.y ||
+ after.max.x > before.max.x || after.max.y > before.max.y)
+ zoom_to_extents();
+ else
+ redraw();
}
More information about the commitlog
mailing list