Skip to main content

Timeline for Cloning the map layer using PyQGIS

Current License: CC BY-SA 4.0

8 events
when toggle format what by license comment
Feb 21 at 12:59 history edited Taras CC BY-SA 4.0
added 551 characters in body
Feb 20 at 16:02 comment added Redoute My error, findlayer().clone() clones the node, but not the layer: I can't set individual filters on the clones. So I have to stay with layer.materialize().
Feb 20 at 14:37 comment added Redoute Before editing this answer you suggested using layer.materialize(). That worked for me and so I could finish a projekt in time :). Your workaround with findLayer clones the complete layer tree node including the layer itself, that's appealing. As @Xeppit notes, my clone had the source prefix "memory?geometry=Point&" instead of "point?". I wonder if that syntax is valid or if this is a bug in clone().
Feb 20 at 14:26 vote accept Redoute
Feb 19 at 13:06 history edited Taras CC BY-SA 4.0
added 1005 characters in body
Feb 18 at 21:28 history edited Taras CC BY-SA 4.0
added 413 characters in body
Feb 18 at 21:08 history edited Taras CC BY-SA 4.0
added 158 characters in body
Feb 18 at 19:56 history answered Taras CC BY-SA 4.0