Bug report #9318

Paste layer style is allowed on layers with different geometry types and breaks rendering

Added by Alexandre Neto over 10 years ago. Updated almost 9 years ago.

Category:Map Legend
Affected QGIS version:master Regression?:No
Operating System:window 7 64 bit Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:17925


QGIS allows user to copy\\paste a style where the origin layer style has different geometry type than the destination.

Although this might sound like a good thing, it breaks the layer rendering in the canvas.

From that point on, the layer won't render in the canvas, and you can't correct the problem via layer properties since it "blocked" to other type symbols. The only way to reverse this is to copy a style from a layer of the same type, or reload the layer.

To replicate:
1 - Add two layers of different geometry types (e.g. Lines and polygons);
2 - Copy the style of one of the layers and paste to the other;

Probably paste option should be disable if the destination layer is not of the same geometry type as the origin.


#1 Updated by Nyall Dawson almost 9 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Fixed in master

Also available in: Atom PDF