Bug report #11516

"Edit widget" setting not loaded, when layer with default style is loaded

Added by Roi Hojgaard about 5 years ago. Updated about 5 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Forms
Affected QGIS version:2.4.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:19786

Description

Dear developers.

The auto loading of default style of a layer is not working, and hasn't since 2.2, as far as I can see. This has been tested against 2.5.0-113.

When you initially load a file from e.g. PostGIS, that has a default style saved in the "layer_styles" table, all the "Edit widgets" remain as "Text Edit", when it should be "Value Map", "Photo" etc. Everything else loads ok.

However, if you at this point click "Restore Default Style", and select "Datasource database", the "Edit widgets" do get initialized correctly. Just not when the map is originally loaded. I believe it is the same for Shape files.

This is rather unfortunate, as it forces me (and many colleagues and partners) to stay with 2.2. Please fix for 2.6.

Our QGIS runs on windows 7 64 bit; PostgreSQL 9.2.5 and PostGIS 2.0.3 are running on CentOS 6.5 Final 64 bit.


Related issues

Duplicates QGIS Application - Bug report #11511: QML doesn't store edit widget info Closed 2014-10-28

Associated revisions

Revision dfff717a
Added by Jürgen Fischer about 5 years ago

when manually loading layers defer loading default style until the layers is
added to the registry so that the readCustomSymbology signal can be processed
by the edit widget registry (fixes #11516)

History

#1 Updated by Jürgen Fischer about 5 years ago

  • Status changed from Open to Closed
  • Resolution set to duplicate

duplicate of #11511

#2 Updated by Roi Hojgaard about 5 years ago

  • Status changed from Closed to Reopened

Excuse me, but I have to ask:

If this is a duplicate of another bug report, where it says "Fixed in changeset e6a259d1806b756cb2a9d91d6c5546ce6d04e710.", but it is not yet working in the current nightly master (QGIS ef56c53), then what gives? Will it not be implemented until the final 2.6 version is compiled?

Regards
Roi Hojgaard

#3 Updated by Jürgen Fischer about 5 years ago

  • Resolution deleted (duplicate)

#4 Updated by Giovanni Manghi about 5 years ago

  • Affected QGIS version changed from 2.4.0 to master
  • Category changed from Forms to Symbology

This ticket is about saving inside the style, inside the database (postgresql) the state of edit widgtes, and I confirm that in master does not work, while saving the style as a .qml file works.

#5 Updated by Jürgen Fischer about 5 years ago

  • Status changed from Reopened to Closed

#6 Updated by Jürgen Fischer about 5 years ago

  • Category changed from Symbology to Forms
  • Status changed from Closed to Reopened
  • Affected QGIS version changed from master to 2.4.0

Giovanni Manghi wrote:

This ticket is about saving inside the style, inside the database (postgresql) the state of edit widgtes, and I confirm that in master does not work, while saving the style as a .qml file works.

Saving and loading the widget settings already worked (that was what #11511 and co were about), but loaded the settings are only processed when the layer is already added to the layer registry, which wasn't the case. Now the layers are loaded without reading the style, added to the registry and only after that the settings are loaded and thereby also applied.

#7 Updated by Jürgen Fischer about 5 years ago

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

Also available in: Atom PDF