[QGIS-Developer] Drag and drop to PostGIS crash
radim.blazek at gmail.com
Fri Jun 2 02:02:05 PDT 2017
On Fri, Jun 2, 2017 at 10:48 AM, Nyall Dawson <nyall.dawson at gmail.com> wrote:
> On 2 June 2017 at 18:32, Radim Blazek <radim.blazek at gmail.com> wrote:
>> On Fri, Jun 2, 2017 at 1:50 AM, Nyall Dawson <nyall.dawson at gmail.com> wrote:
>>> I think copy should definitely be the ONLY behavior here. Otherwise
>>> there's data loss - user's styling and layer settings will be lost,
>>> and dragging memory layers will lose all features (admittedly dragging
>>> memory layers doesn't copy any features anyway, but that makes it
>>> worse... the contents are irretrievably lost).
>> Grr! That is what I need. Why it does not copy memory layers? There
>> should not be any difference.
> Didn't you write this code? ;)
I may be, but IIRC, originally there was DD only within the browser,
so I was pleased to see DD from layertree "working".
> QgsBrowserItem::handleDrop just gets a layer URI in the mime data -
> that's enough for the other providers to be able to open a new copy of
> the layer to grab the features from, but the for the memory provider
> the uri only gives the table structure.... there's no features in the
> newly created layer.
It should be possible to pass the layer id and open an iterator on it?
More information about the QGIS-Developer