[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (c3eb26ad40042b9b21d5eb97a2537f36d8d1aa74)
The branch, master has been updated
via c3eb26ad40042b9b21d5eb97a2537f36d8d1aa74 (commit)
via 9875699171ce99d317525d532ea548d3ed288e95 (commit)
from bb5f9fa099e1ee2f3f54a57491dd543db3446799 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/action.c | 8 ++++++--
src/hid/gtk/gui-pinout-preview.c | 10 ++--------
2 files changed, 8 insertions(+), 10 deletions(-)
=================
Commit Messages
=================
commit c3eb26ad40042b9b21d5eb97a2537f36d8d1aa74
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
Fixup usage of the never initialised, obsolete, Output.{Width,Height}
For the stroke handling case (relating to zooming) it isn't clear what is
correct, but for now, substitute PCB->MaxWidth and PCB->MaxHeight.
This may still leave stroke based zooming broken, but it was CERTAINLY
broken before.
:100644 100644 c03042e... ed087c1... M src/action.c
commit 9875699171ce99d317525d532ea548d3ed288e95
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
hid/gtk: Remove dead code (due to bitrot) from pinout_zoom_fit() function
The code tried to compare against the uninitialised, unused Output.Width
and Output.Height. Assuming these were initialised to zero by the compiler,
the conditional would always cause the function to return FALSE.
Remove the conditional, and drop the boolean return value from this
function, short-cutting the caller to the utilised code-path.
This removes the (long broken) feature where by the natural size
(in pixels) of the pinout preview would be reduced if it was greater than
3/4 of the viewport size (in pixels) of the active PCB.
:100644 100644 6cd8069... 2a205fa... M src/hid/gtk/gui-pinout-preview.c
=========
Changes
=========
commit c3eb26ad40042b9b21d5eb97a2537f36d8d1aa74
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
Fixup usage of the never initialised, obsolete, Output.{Width,Height}
For the stroke handling case (relating to zooming) it isn't clear what is
correct, but for now, substitute PCB->MaxWidth and PCB->MaxHeight.
This may still leave stroke based zooming broken, but it was CERTAINLY
broken before.
diff --git a/src/action.c b/src/action.c
index c03042e..ed087c1 100644
--- a/src/action.c
+++ b/src/action.c
@@ -549,14 +549,18 @@ FinishStroke (void)
LocationType x = (StrokeBox.X1 + StrokeBox.X2) / 2;
LocationType y = (StrokeBox.Y1 + StrokeBox.Y2) / 2;
int z;
+ /* XXX: PCB->MaxWidth and PCB->MaxHeight may be the wrong
+ * divisors below. The old code WAS broken, but this
+ * replacement has not been tested for correctness.
+ */
z =
1 +
- log (fabs (StrokeBox.X2 - StrokeBox.X1) / Output.Width) /
+ log (fabs (StrokeBox.X2 - StrokeBox.X1) / PCB->MaxWidth) /
log (2.0);
z =
MAX (z,
1 +
- log (fabs (StrokeBox.Y2 - StrokeBox.Y1) / Output.Height) /
+ log (fabs (StrokeBox.Y2 - StrokeBox.Y1) / PCB->MaxHeight) /
log (2.0));
SetZoom (z);
commit 9875699171ce99d317525d532ea548d3ed288e95
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
hid/gtk: Remove dead code (due to bitrot) from pinout_zoom_fit() function
The code tried to compare against the uninitialised, unused Output.Width
and Output.Height. Assuming these were initialised to zero by the compiler,
the conditional would always cause the function to return FALSE.
Remove the conditional, and drop the boolean return value from this
function, short-cutting the caller to the utilised code-path.
This removes the (long broken) feature where by the natural size
(in pixels) of the pinout preview would be reduced if it was greater than
3/4 of the viewport size (in pixels) of the active PCB.
diff --git a/src/hid/gtk/gui-pinout-preview.c b/src/hid/gtk/gui-pinout-preview.c
index 6cd8069..2a205fa 100644
--- a/src/hid/gtk/gui-pinout-preview.c
+++ b/src/hid/gtk/gui-pinout-preview.c
@@ -52,7 +52,7 @@
RCSID ("$Id$");
-static gboolean
+static void
pinout_zoom_fit (GhidPinoutPreview * pinout, gint zoom)
{
pinout->zoom = zoom;
@@ -69,11 +69,6 @@ pinout_zoom_fit (GhidPinoutPreview * pinout, gint zoom)
pinout->h_pixels = (gint) (pinout->scale *
(pinout->element.BoundingBox.Y2 -
pinout->element.BoundingBox.Y1));
-
- if (pinout->w_pixels > 3 * Output.Width / 4 ||
- pinout->h_pixels > 3 * Output.Height / 4)
- return FALSE;
- return TRUE;
}
@@ -128,8 +123,7 @@ pinout_set_data (GhidPinoutPreview * pinout, ElementType * element)
Settings.PinoutOffsetY -
pinout->element.BoundingBox.Y1);
- if (!pinout_zoom_fit (pinout, 2))
- pinout_zoom_fit (pinout, 3);
+ pinout_zoom_fit (pinout, 3);
ELEMENTLINE_LOOP (&pinout->element);
{
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs