Re: [QGIS-Developer] How to update change the datasource of already existing layer

2019-06-13 Thread Ivan Ivanov
Okay, thanks, all clear now. Maybe documenting that setDataSource is useless in case of memory layers would prevent future questions like this. Thanks again! On Fri, 14 Jun 2019 at 01:49, Nyall Dawson wrote: > On Fri, 14 Jun 2019 at 09:41, Ivan Ivanov wrote: > > > > Hi, Nya

Re: [QGIS-Developer] How to update change the datasource of already existing layer

2019-06-13 Thread Ivan Ivanov
having 3.6.3 on Ubuntu). Best, Ivan On Fri, 14 Jun 2019 at 01:21, Nyall Dawson wrote: > On Wed, 12 Jun 2019 at 10:09, Ivan Ivanov wrote: > > > > I fixed it. Sorry for the inconvenience: > > > > layer1 = QgsVectorLayer('Polygon?crs=epsg:32612', 'layer2&#

Re: [QGIS-Developer] How to update change the datasource of already existing layer

2019-06-11 Thread Ivan Ivanov
layer1.setDataSource(layer2.source(), layer2.name(), layer2.dataProvider().name()) print(layer1.source()) On Wed, 12 Jun 2019 at 00:28, Nyall Dawson wrote: > On Tue, 11 Jun 2019 at 15:06, Ivan Ivanov wrote: > > > > Hello, > > > > > > Can you give me some idea why I'

[QGIS-Developer] How to update change the datasource of already existing layer

2019-06-10 Thread Ivan Ivanov
Hello, Can you give me some idea why I'm getting two uids in the layer's source? And also how I can fix this because now the layer just disappears from the map canvas. (all layers are isValid() = True) oldLayer.source() # MultiLineString?crs=EPSG:32737&field=fid:integer(0,0)&uid={6cd1f176-9c05-4