Bug report #21954

change data source and style gets overridden

Added by Gavin Fleming 7 months ago. Updated 7 months ago.

Status:Feedback
Priority:Normal
Assignee:-
Category:Symbology
Affected QGIS version:3.6.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:29769

Description

I created a project whose layers came from a locally available PostGIS connection (replication slave).

When I opened the project on another network I had to change the PostGIS source to the replication master host.

The layers loaded fine but with their default styles - my layer styles were overriden.

Expected behaviour: replacing a layer's source should not affect the style.


Related issues

Duplicated by QGIS Application - Bug report #22089: .qgz symbolisation fails when path to data is adjusted at... Closed 2019-05-16
Duplicated by QGIS Application - Bug report #22093: Layer style is not maintained when changing windows folder Closed 2019-05-16

History

#1 Updated by Alessandro Pasotti 7 months ago

  • Status changed from Open to Feedback

Can you please explain step-by-step what you did after loading the "bad" project? (a short video might also help)

Can you please attach a test project and minimal DB dump to replicate this issue?

#2 Updated by Nyall Dawson 7 months ago

Alessandro - I'm guessing this is because the layer has a default style set on the db, and it's getting re-applied after the call to change to layer's uri.

#3 Updated by Alessandro Pasotti 7 months ago

@Nyall thank you for the clarification, I totally misunderstood "default style" and I thought it was the random style applied to new layers.

#4 Updated by Jürgen Fischer 6 months ago

  • Duplicated by Bug report #22089: .qgz symbolisation fails when path to data is adjusted at startup added

#5 Updated by Jürgen Fischer 6 months ago

  • Duplicated by Bug report #22093: Layer style is not maintained when changing windows folder added

Also available in: Atom PDF