delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2012/11/12/20:39:00

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: not scanned
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Message-ID: <1352770711.9720.6.camel@localhost>
Subject: Re: [geda-user] RFC: storing cursor position in PCB files
From: Peter Clifton <pcjc2 AT cam DOT ac DOT uk>
To: geda-user AT delorie DOT com
Date: Tue, 13 Nov 2012 01:38:31 +0000
In-Reply-To: <20121113002422.27378.qmail@stuge.se>
References: <508BBF8D DOT 5070309 AT jump-ing DOT de> <509B51BE DOT 3010203 AT xs4all DOT nl>
<alpine DOT DEB DOT 2 DOT 00 DOT 1211081144590 DOT 25985 AT igor2priv>
<509C7380 DOT 2090008 AT ecosensory DOT com> <1352749309 DOT 10421 DOT 15 DOT camel AT localhost>
<20121113002422 DOT 27378 DOT qmail AT stuge DOT se>
X-Mailer: Evolution 3.6.0-0ubuntu3
Mime-Version: 1.0
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019