[Thuban-list] Re: adding layers
jan at intevation.de
Thu Aug 21 12:46:11 CEST 2003
On Thu, Aug 21, 2003 at 12:24:20PM +0200, Bernhard Herzog wrote:
> Jonathan Coles <jonathan at jpcoles.com> writes:
> > This may be as easy as setting the wxCHANGE_DIR flag in the constructor
> > of wxFileDialog.
> 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.
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-Oliver Wagner http://intevation.de/~jan/
Intevation GmbH http://intevation.de/
More information about the Thuban-list