[QGIS-Developer] Drag and drop to PostGIS crash

Nyall Dawson nyall.dawson at gmail.com
Fri Jun 2 01:48:23 PDT 2017

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? ;)

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.


More information about the QGIS-Developer mailing list