[QGIS-Developer] shp file from /tmp file are seen as memory-layers?

Alessandro Pasotti apasotti at gmail.com
Tue Dec 3 02:06:29 PST 2019


On Tue, Dec 3, 2019 at 10:58 AM Richard Duivenvoorde <rdmailings at duif.net>
wrote:

> On 03/12/2019 09.50, Nyall Dawson wrote:
> >> Is this by design? Or is it a bug because there is 'tmp' in the path?
> >> I tested also to put it in ~/tmp but then it is OK...
>
> > By design -- it was added because many of the processing providers
> > which rely on 3rd party utilities (e.g. grass, saga) put temporary
> > outputs there, and users weren't getting any warnings that these are
> > just temporary. Basically the warning which previously showed only for
> > memory layers has been extended to include anything inside the
> > operating system's temporary folder (i.e. /tmp, but not ~/tmp on
> > Linux).
>
> Ah, thanks Nyall. I understand the reasoning, and agree...
>
> Though it does not feel as perfect yet:
>
> The memory tooltip of this layer says:
>  "Temporary Layer Only. Contents will be discarded after closing QGIS"
> But compared to a real memory layer, it is still there if you reopen the
> project (or quit/open QGIS).
> So it seems we mix two concepts?
>
> Thinking out loud here, I know this will all cost time/energy, so I
> understand if this is ignored...
>
> What about leaving out the 'memory' icon, and only warn users IF they
> have layers in temporary places? And instead of:
> "This project includes one or more temporary layers. These layers are
> not permanently saved and their contents will be lost. Are you sure you
> want to proceed?"
> Something like:
> "This project includes one or more layers which are saved in temporary
> directories". If you want to keep that data, please save or copy the
> data to non-temporary dirs" ?
>
> Or as bonus: maybe thing of some icon for these processing output
> layers: maybe the little 'gear'-icon we use for processing?
> In the case of a processing output I will then see the little gear icons
> (AND get the warning).
> In my usecase I will only get the warning (and I will ignore it :-) )
>
> As said: I understand there are probably more important things to do,
> just wanted to think about it a little...
>
> Regards,
>
> Richard Duivenvoorde
>
>
Hi Richard,

I agree with you that in-memory layer and file-based layers stored in
temporary folders are two different things and we should try to not mix the
concepts.

>From a UX perspective they both deserve a warning/icon that reminds the
user that they will be eventually lost if not action is taken, we just need
to make sure that the user understands the difference.

I'd open a question dialog in both cases when the layers are unloaded but I
would choose a (slightly?) different icon to mark the memory and tmp layers
and certainly a different tooltip message.


Cheers


-- 
Alessandro Pasotti
w3:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20191203/0d646fda/attachment.html>


More information about the QGIS-Developer mailing list