[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (87f58f04d32c11e7132629980bcf03a47e78355f)
The branch, master has been updated
discards 94419452ccb345c31d55a13db7ab4f20ef34f512 (commit)
discards 6dbea16935e0c87b12b62d818a899cdadb745b89 (commit)
via 87f58f04d32c11e7132629980bcf03a47e78355f (commit)
via e43e90ceef7da7be8981dfe834054be1f54d6200 (commit)
via e82ad9b7dcb3f9658a8f929b319be46d8c96a61f (commit)
from 94419452ccb345c31d55a13db7ab4f20ef34f512 (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 | 11 ++---------
src/select.c | 4 ++--
2 files changed, 4 insertions(+), 11 deletions(-)
=================
Commit Messages
=================
commit 87f58f04d32c11e7132629980bcf03a47e78355f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
action.c: Simplify ActionMovePointer()
The save / restore of the crosshair coordinates is unnecessary since
we are emitting the appropriate change notifications.
:100644 100644 e222dbf... 6339e39... M src/action.c
commit e43e90ceef7da7be8981dfe834054be1f54d6200
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
action.c: Remove dead code, IgnoreMotionEvents
:100644 100644 d892429... e222dbf... M src/action.c
commit e82ad9b7dcb3f9658a8f929b319be46d8c96a61f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
misc.c: Remove unused "delta" argument from CenterDisplay()
All the callers are passing absolute locations.
:100644 100644 d6e1d89... d892429... M src/action.c
:100644 100644 92c8b35... 2f9053d... M src/find.c
:100644 100644 674e495... 6d50d16... M src/hid/gtk/gui-drc-window.c
:100644 100644 ce2ab4a... befeeed... M src/misc.c
:100644 100644 45d6e52... 7926460... M src/misc.h
:100644 100644 e42d4bb... 8dfe270... M src/select.c
=========
Changes
=========
commit 87f58f04d32c11e7132629980bcf03a47e78355f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
action.c: Simplify ActionMovePointer()
The save / restore of the crosshair coordinates is unnecessary since
we are emitting the appropriate change notifications.
diff --git a/src/action.c b/src/action.c
index e222dbf..6339e39 100644
--- a/src/action.c
+++ b/src/action.c
@@ -2114,18 +2114,11 @@ ActionSetThermal (int argc, char **argv, int x, int y)
void
ActionMovePointer (char *deltax, char *deltay)
{
- LocationType x, y, dx, dy;
+ LocationType dx, dy;
- /* save old crosshair position */
- x = Crosshair.X;
- y = Crosshair.Y;
dx = (LocationType) (atoi (deltax) * PCB->Grid);
dy = (LocationType) (atoi (deltay) * PCB->Grid);
- MoveCrosshairRelative (TO_SCREEN_SIGN_X (dx), TO_SCREEN_SIGN_Y (dy));
- FitCrosshairIntoGrid (Crosshair.X, Crosshair.Y);
- /* restore crosshair for erasure */
- Crosshair.X = x;
- Crosshair.Y = y;
+
notify_crosshair_change (false);
MoveCrosshairRelative (TO_SCREEN_SIGN_X (dx), TO_SCREEN_SIGN_Y (dy));
/* update object position and cursor location */
commit e43e90ceef7da7be8981dfe834054be1f54d6200
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
action.c: Remove dead code, IgnoreMotionEvents
diff --git a/src/action.c b/src/action.c
index d892429..e222dbf 100644
--- a/src/action.c
+++ b/src/action.c
@@ -323,7 +323,6 @@ static int defer_updates = 0;
static int defer_needs_update = 0;
static Cardinal polyIndex = 0;
-static bool IgnoreMotionEvents = false;
static bool saved_mode = false;
#ifdef HAVE_LIBSTROKE
static bool mid_stroke = false;
@@ -2152,18 +2151,12 @@ EventMoveCrosshair (int ev_x, int ev_y)
return;
}
#endif /* HAVE_LIBSTROKE */
- /* ignore events that are caused by ActionMovePointer */
- if (!IgnoreMotionEvents)
+ if (MoveCrosshairAbsolute (ev_x, ev_y))
{
- if (MoveCrosshairAbsolute (ev_x, ev_y))
- {
- /* update object position and cursor location */
- AdjustAttachedObjects ();
- notify_crosshair_change (true);
- }
+ /* update object position and cursor location */
+ AdjustAttachedObjects ();
+ notify_crosshair_change (true);
}
- else
- IgnoreMotionEvents = false;
}
/* --------------------------------------------------------------------------- */
commit e82ad9b7dcb3f9658a8f929b319be46d8c96a61f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
misc.c: Remove unused "delta" argument from CenterDisplay()
All the callers are passing absolute locations.
diff --git a/src/action.c b/src/action.c
index d6e1d89..d892429 100644
--- a/src/action.c
+++ b/src/action.c
@@ -565,7 +565,7 @@ FinishStroke (void)
log (2.0));
SetZoom (z);
- CenterDisplay (x, y, false);
+ CenterDisplay (x, y);
break;
}
@@ -3836,8 +3836,7 @@ ActionAddRats (int argc, char **argv, int x, int y)
DrawRat (shorty);
Draw ();
CenterDisplay ((shorty->Point2.X + shorty->Point1.X) / 2,
- (shorty->Point2.Y + shorty->Point1.Y) / 2,
- false);
+ (shorty->Point2.Y + shorty->Point1.Y) / 2);
}
break;
}
@@ -5957,7 +5956,7 @@ ActionNew (int argc, char **argv, int x, int y)
ResetStackAndVisibility ();
CreateDefaultFont ();
SetCrosshairRange (0, 0, PCB->MaxWidth, PCB->MaxHeight);
- CenterDisplay (PCB->MaxWidth / 2, PCB->MaxHeight / 2, false);
+ CenterDisplay (PCB->MaxWidth / 2, PCB->MaxHeight / 2);
Redraw ();
hid_action ("PCBChanged");
diff --git a/src/find.c b/src/find.c
index 92c8b35..2f9053d 100644
--- a/src/find.c
+++ b/src/find.c
@@ -4532,7 +4532,7 @@ GotoError (void)
(PCB->Data, (LayerTypePtr) thing_ptr1), true,
true);
}
- CenterDisplay (X, Y, false);
+ CenterDisplay (X, Y);
}
void
diff --git a/src/hid/gtk/gui-drc-window.c b/src/hid/gtk/gui-drc-window.c
index 674e495..6d50d16 100644
--- a/src/hid/gtk/gui-drc-window.c
+++ b/src/hid/gtk/gui-drc-window.c
@@ -260,7 +260,7 @@ row_activated_cb (GtkTreeView *view, GtkTreePath *path,
if (violation == NULL)
return;
- CenterDisplay (violation->x_coord, violation->y_coord, false);
+ CenterDisplay (violation->x_coord, violation->y_coord);
}
diff --git a/src/misc.c b/src/misc.c
index ce2ab4a..befeeed 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -769,17 +769,12 @@ GetDataBoundingBox (DataTypePtr Data)
* coordinates
*/
void
-CenterDisplay (LocationType X, LocationType Y, bool Delta)
+CenterDisplay (LocationType X, LocationType Y)
{
double save_grid = PCB->Grid;
PCB->Grid = 1;
- if (Delta)
- MoveCrosshairRelative (X, Y);
- else
- {
- if (MoveCrosshairAbsolute (X, Y))
- notify_crosshair_change (true);
- }
+ if (MoveCrosshairAbsolute (X, Y))
+ notify_crosshair_change (true);
gui->set_crosshair (Crosshair.X, Crosshair.Y, HID_SC_WARP_POINTER);
PCB->Grid = save_grid;
}
diff --git a/src/misc.h b/src/misc.h
index 45d6e52..7926460 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -59,7 +59,7 @@ bool IsLayerNumEmpty (int);
bool IsLayerGroupEmpty (int);
bool IsPasteEmpty (int);
BoxTypePtr GetDataBoundingBox (DataTypePtr);
-void CenterDisplay (LocationType, LocationType, bool);
+void CenterDisplay (LocationType, LocationType);
void SetFontInfo (FontTypePtr);
int ParseGroupString (char *, LayerGroupTypePtr, int /* LayerN */);
int ParseRouteString (char *, RouteStyleTypePtr, const char *);
diff --git a/src/select.c b/src/select.c
index e42d4bb..8dfe270 100644
--- a/src/select.c
+++ b/src/select.c
@@ -87,7 +87,7 @@ SelectPin (LibraryEntryTypePtr entry, bool toggle)
if (toggle)
{
TOGGLE_FLAG (SELECTEDFLAG, pin);
- CenterDisplay (pin->X, pin->Y, false);
+ CenterDisplay (pin->X, pin->Y);
}
else
SET_FLAG (SELECTEDFLAG, pin);
@@ -103,7 +103,7 @@ SelectPin (LibraryEntryTypePtr entry, bool toggle)
if (toggle)
{
TOGGLE_FLAG (SELECTEDFLAG, pad);
- CenterDisplay (pad->Point1.X, pad->Point1.Y, false);
+ CenterDisplay (pad->Point1.X, pad->Point1.Y);
}
else
SET_FLAG (SELECTEDFLAG, pad);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs