Mail Archives: geda-user/2012/11/12/20:39:00
On Tue, 2012-11-13 at 01:24 +0100, Peter Stuge wrote:
> Peter Clifton wrote:
> > > >> I filed this as bug report https://bugs.launchpad.net/pcb/+bug/1076252
> >
> > Someone send a patch to remove saving this line in the output file,
> > and I'll gladly commit it.
>
> Bert has attached a patch to the bug, along with a branch reference:
>
> git://git.geda-project.org/pcb.git LP1076252
Sorry, I'd missed that..
> But: Does PCB_FILE_VERSION actually have to change?
No, it does not. (IMO)
The patch doesn't actually remove the cursor directive from the file
format, it just stops it being saved out.
> And: What is the cursor initialized to when reading a file without Cursor?
Untested, but I think zero.
The only use I can see of the cursor information sets the initial
Crosshair X and Y positions in the newly created PCB structure. That
structure is created with calloc, which zeros the allocated memory.
HOWEVER..
I note that the cursor directive restores the default zoom of a given
PCB file. Removing this line will stop PCB saving the view's zoom state.
Personally, I think this isn't an issue - especially since when I just
tested now, it did not correctly restore any view settings. (That might
just be my PCB+GL branch though - would someone mind testing git HEAD
GTK and Lesstif hids for me?)
I actually want to divorce view / zoom state from the core into the
GUI's renderer, as such state rather depends on the renderer. (My 3D
efforts require several more variables, for example!).
Best regards
--
Peter Clifton <peter DOT clifton AT clifton-electronics DOT co DOT uk>
Clifton Electronics
- Raw text -