[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-user: pcb: visual indication for locked elements



Hi all,

I thought it would be nice to have a (visual) indication in pcb that a
component is locked.

A way for (visual) indication of locked components is to change
the "diamond" marker (indicating the insertion point) by adding a "L" on
top of it.

It's a trivial amount of lines added to draw.c in DrawEMark ().

Just append at the end of the function.

Patch attached (created with git).

Kind regards,

Bert Timmerman.
From 3e04a1d6ea9a1d36b8d60ed747d2e2552b5cd9aa Mon Sep 17 00:00:00 2001
From: Bert Timmerman <bert.timmerman@xxxxxxxxx>
Date: Fri, 20 Jul 2007 16:55:27 +0200
Subject: [PATCH] modified:   pcb/src/draw.c
This patch is to allow for locked elements to be recognised on an instant.

If an element is locked an "L" is placed on top of the "diamond" marker.
---
 pcb/src/draw.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/pcb/src/draw.c b/pcb/src/draw.c
index 808d224..280cbe6 100644
--- a/pcb/src/draw.c
+++ b/pcb/src/draw.c
@@ -607,6 +607,14 @@ DrawEMark (ElementTypePtr e, LocationType X, LocationType Y,
   gui->draw_line (Output.fgGC, X + mark_size, Y, X, Y - mark_size);
   gui->draw_line (Output.fgGC, X - mark_size, Y, X, Y + mark_size);
   gui->draw_line (Output.fgGC, X + mark_size, Y, X, Y + mark_size);
+  /*
+   * If an element is locked, place a "L" on top of the "diamond".
+   */
+  if (TEST_FLAG (LOCKFLAG, e))
+   {
+     gui->draw_line (Output.fgGC, X, Y, X + 2 * mark_size, Y);
+     gui->draw_line (Output.fgGC, X, Y, X, Y - 4* mark_size);
+   }
 }
 
 static int
-- 
1.5.0.6


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user