Subject: [Thuban-list] Re: adding layers

From: Jonathan Coles <[email-masked]>
Date: Thu, 21 Aug 2003 05:21:24 -0000

On Wed, 2003-08-20 at 16:15, Jan-Oliver Wagner wrote:
> On Wed, Aug 20, 2003 at 01:15:58PM -0400, Fidel Serrano wrote:
> > i am using thuban as viewer for a proyect in a research center here in mexico, and i have a comment:
> > 
> > when adding layers to a sesion, the open file dialog starts allways in the same folder (my documents for example), it is posible, modifing the style of the file dialog to make it remember the folder from where you got the previus layer archive...
> 
> thanks for the feedback.
> You are also welcome to send such input to the mailing list to ensure
> you reach all the interested developers and users.
> 
> Yes, I noticed this behaviour as annoying as well.
> I will look into this to see whether we get it into the 0.9 release
> (though it is being finalized these days).
> 

This may be as easy as setting the wxCHANGE_DIR flag in the constructor
of wxFileDialog. 

see here for more details:
http://www.wxwindows.org/manuals/2.4.1/wx140.htm#wxfiledialogconstr

--jonathan

-- 
=========================================================================
 Jonathan Coles                                   http://www.jpcoles.com 
 [email-masked]  GnuPG Key: http://www.jpcoles.com/gpg_pub_key.asc 
=========================================================================

---

From: Bernhard Herzog <[email-masked]>
Date: Thu, 21 Aug 2003 12:24:20 +0200

Jonathan Coles <[email-masked]> writes:

>> > when adding layers to a sesion, the open file dialog starts allways
>> > in the same folder (my documents for example), it is posible,
>> > modifing the style of the file dialog to make it remember the
>> > folder from where you got the previus layer archive...
[...]
>> (though it is being finalized these days).

I for one probably won't have time.

> This may be as easy as setting the wxCHANGE_DIR flag in the constructor

IMO that's the wrong approach. An application should never change the
current working directory because the interpretation of relative
filenames changes which can lead to all kinds of subtle bugs. Thuban
makes sure in several places that it does have absolute filenames but
there may be places where it doesn't do that.

A better way is to simply remember the directory of the last file opened
and pass that as the default directory to the dialog. Then you could
also remember different directories for different purposes, e.g. one for
.thuban files, one for shapefiles, one for projection files, etc.

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Sketch                                 http://sketch.sourceforge.net/
Thuban                                  http://thuban.intevation.org/

---

From: Jan-Oliver Wagner <[email-masked]>
Date: Thu, 21 Aug 2003 12:46:11 +0200

> .thuban files, one for shapefiles, one for projection files, etc.

I agree with this approach.

Furthermore, the Open File dialog to load shapefile could be changed
to allow multiple selection of files (flag wxMULTIPLE).
I think, this would immediately cure most of the agony cases :-)
If you think, this is a good idea, I will do the changes.

	Jan
-- 
Jan-Oliver Wagner               http://intevation.de/~jan/

Intevation GmbH	              	     http://intevation.de/
FreeGIS	                               http://freegis.org/

---

From: Jan-Oliver Wagner <[email-masked]>
Date: Thu, 21 Aug 2003 13:58:12 +0200

> I think, this would immediately cure most of the agony cases :-)

it is in CVS now.

Now you can do multi-selection for loading shapefile using the
shift-key.

Best

	Jan