|
From: <gi...@gp...> - 2010-04-23 19:07:41
|
The branch, master has been updated
via 50d058ba2ca3403a6fbacf3885160806f448a3dc (commit)
from 6772dffe97136dadfb38c56e1ccbf83250e60185 (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/change.c | 20 +++++++++++++++++++-
src/change.h | 3 ++-
2 files changed, 21 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit 50d058ba2ca3403a6fbacf3885160806f448a3dc
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Handle attempts to change clearance on polygons.
If the user attempts to change the clearance between polygons and
objects within the polygon by pressing 'k' over the *polygon*, notice
that attemp and tell the user how to accomplish what they want.
:100644 100644 8cbd384... f2bcd40... M src/change.c
:100644 100644 bd7749a... fc577a0... M src/change.h
=========
Changes
=========
commit 50d058ba2ca3403a6fbacf3885160806f448a3dc
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Handle attempts to change clearance on polygons.
If the user attempts to change the clearance between polygons and
objects within the polygon by pressing 'k' over the *polygon*, notice
that attemp and tell the user how to accomplish what they want.
diff --git a/src/change.c b/src/change.c
index 8cbd384..f2bcd40 100644
--- a/src/change.c
+++ b/src/change.c
@@ -82,6 +82,7 @@ static void *ChangeViaClearSize (PinTypePtr);
static void *ChangeViaMaskSize (PinTypePtr);
static void *ChangeLineSize (LayerTypePtr, LineTypePtr);
static void *ChangeLineClearSize (LayerTypePtr, LineTypePtr);
+static void *ChangePolygonClearSize (LayerTypePtr, PolygonTypePtr);
static void *ChangeArcSize (LayerTypePtr, ArcTypePtr);
static void *ChangeArcClearSize (LayerTypePtr, ArcTypePtr);
static void *ChangeTextSize (LayerTypePtr, TextTypePtr);
@@ -175,7 +176,7 @@ static ObjectFunctionType ChangeThermalFunctions = {
static ObjectFunctionType ChangeClearSizeFunctions = {
ChangeLineClearSize,
NULL,
- NULL,
+ ChangePolygonClearSize, /* just to tell the user not to :-) */
ChangeViaClearSize,
NULL,
NULL,
@@ -741,6 +742,23 @@ ChangeLineClearSize (LayerTypePtr Layer, LineTypePtr Line)
}
/* ---------------------------------------------------------------------------
+ * Handle attepts to change the clearance of a polygon.
+ */
+static void *
+ChangePolygonClearSize (LayerTypePtr Layer, PolygonTypePtr poly)
+{
+ static int shown_this_message = 0;
+ if (!shown_this_message)
+ {
+ gui->confirm_dialog ("To change the clearance of objects in a polygon, "
+ "change the objects, not the polygon.", "Ok", NULL);
+ shown_this_message = 1;
+ }
+
+ return (NULL);
+}
+
+/* ---------------------------------------------------------------------------
* changes the size of an arc
* returns TRUE if changed
*/
diff --git a/src/change.h b/src/change.h
index bd7749a..fc577a0 100644
--- a/src/change.h
+++ b/src/change.h
@@ -46,8 +46,9 @@
#define CHANGE2NDSIZE_TYPES \
(VIA_TYPE | PIN_TYPE | ELEMENT_TYPE)
+/* We include polygons here only to inform the user not to do it that way. */
#define CHANGECLEARSIZE_TYPES \
- (PIN_TYPE | PAD_TYPE | VIA_TYPE | LINE_TYPE | ARC_TYPE)
+ (PIN_TYPE | PAD_TYPE | VIA_TYPE | LINE_TYPE | ARC_TYPE | POLYGON_TYPE)
#define CHANGESQUARE_TYPES \
(ELEMENT_TYPE | PIN_TYPE | PAD_TYPE)
|