orthogonal move broken.

Bug #699202 reported by KaiMartin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gEDA project
New
Medium
Unassigned
pcb
New
Medium
Unassigned

Bug Description

Orthogonal move ssems to be broken in pcb v1.99, cvs from 2007-08-13

* Strange behaviour of the line tool if orthogonal move is set. How to reproduce
  1) set grid to 100 mil
  2) select line tool
  3) start line at (100/100)
  4) set node at (100/200)
  5) try to set a node at (200/200).
     pcb will only allow nodes at (100 / n*100) or (n*100 / 100)

---<(kaimartin)>---

Tags: sf-bugs
Revision history for this message
Ineiev (ineiev) wrote :

The crosshair orthomoves relatively to the first point of the (multi)line.
this can help:

Index: src/action.c
===================================================================
RCS file: /cvsroot/pcb/pcb/src/action.c,v
retrieving revision 1.112
diff -U2 -b -r1.112 action.c
--- src/action.c 4 Sep 2007 00:08:39 -0000 1.112
+++ src/action.c 4 Sep 2007 05:35:21 -0000
@@ -856,5 +856,6 @@
   void *ptr1, *ptr2, *ptr3;

- if (!Marked.status || TEST_FLAG (LOCALREFFLAG, PCB))
+ if (!Marked.status || TEST_FLAG (LOCALREFFLAG, PCB) ||
+ (Settings.Mode == LINE_MODE && TEST_FLAG (ORTHOMOVEFLAG,PCB)))
     SetLocalRef (Crosshair.X, Crosshair.Y, True);
   switch (Crosshair.AttachedLine.State)

Revision history for this message
Ben Jackson (ben.jackson) wrote :

I agree the behavior is odd and I was about to apply the patch, but here's the thing:

That's the only use of LOCALREFFLAG anywhere. The entire point seems to be to give you the option of the behavior you want: If you set "Settings|Auto zero delta measurements" (clear as mud, eh?) you set LOCALREFFLAG and then ortho lines behave exactly like you want. Otherwise you are restricted to the mark (which you can set in advance with Ctrl-M, so in theory there's even a point).

I'm open to suggestions, but I don't really like ORTHOMOVE implies LOCALREF (btw the LINE_MODE test is superfluous -- that code only executes in line mode).

Revision history for this message
Ineiev (ineiev) wrote :

>That's the only use of LOCALREFFLAG anywhere.

grep shows another occurrence in misc.c. there are a lot of things that I can't undestand in PCB code, e.g. why any line should have thermals flags to every layer. so, I just tried (not very successfully) to propose most conservative changes that fix the evidently buggy behaviour and concern nothing else.

>LINE_MODE test is superfluous -- that code only executes in line mode).

Actually I think this was a mistake because the code executes also in polygon mode and SetLocalRef() should be called then, too.

Best regards

Revision history for this message
Jared Casper (jaredcasper) wrote :

The use in misc.c is used when moving an object around using the mouse. If LOCALREF is on, it will use the point of the initial click as the reference when moving objects, if it is off it will use the mark if set.

Seems like the best fix for this bug may be a better name for the LOCALREFFLAG than "Auto zero delta measurements" Maybe reverse the polarity and call it "Use mark as reference when moving and drawing" or something?

I agree that ORTHOMOVE should not imply LOCALREF.

Traumflug (mah-jump-ing)
Changed in geda-project:
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.