Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#1000 closed defect (fixed)

Saving/loading styles - symbolization not shown in Legend; layer disappears from map canvas

Reported by: smizuno Owned by: nobody
Priority: major: does not work as expected Milestone:
Component: Symbology Version: Trunk
Keywords: Cc:
Must Fix for Release: Yes Platform: All
Platform Version: Awaiting user input: no

Description

Saving/loading styles - two problems

  1. the legend does not display the loaded style symbolization
  1. the layer disappears from the map display after loading a saved style and then toggling visibility

Tested with r8242 on Linux, but I believe this affects all platforms.

Steps to show the problems:

Set the stage - show that style save/load appears to work

  1. start QGIS
  1. load a vector file (OGR or PostGIS) that has an attribute that can be classified on unique value (this is what I used)
  1. in layer Properties, symbolize the layer using Unique Value; just accept what is automatically set
  1. OK to the Properties dialog
  1. observe that the Legend shows the symbolization - Field and values/colors
  1. back in layer Properties,
  1. use the Save Style button to save the current symbolization
  1. set the Legend type to Single Symbol
  1. OK the Properties
  1. the Legend shows the single value color and the map is drawn with a single color
  1. in layer Properties, load the Style saved in 6a, then OK
  1. observe that the Legend shows the symbolization and the map is symbolized per the loaded style
  1. click the layer visibility off, then on, to show that layer disappears and reappears as expected
  1. close QGIS so we can start fresh

Demonstrate the two problems:

  1. start QGIS
  1. load the same vector file used in step 2
  1. in layer Properties load the Style saved in 6a; OK to the Properties dialog
  1. observe that the Legend shows single value symbolization, but the map has been symbolized per

the loaded style

This is the first problem.

Expected to see the Unique Value - field and values/colors symbolization in Legend.

  1. click the layer visibility off, then on
  1. notice that the layer disappears and does not reappear in the map; the Legend still shows the

layer

This is the second problem.

The following messages appear on the console when setting layer visibility to on in step 16:

Warning: WARNING: layer '_wnc_washington_ogr_modified_wkb_geometrysql_20080317200058346' not found in map layer registry!

Warning: QObject::connect: Cannot connect (null)::repaintRequested() to QgsMapCanvas::refresh()

Warning: QObject::connect: Cannot connect (null)::screenUpdateRequested() to QgsMapCanvas::updateMap()

Warning: WARNING: layer '_wnc_washington_ogr_modified_wkb_geometrysql_20080317200058346' not found in map layer registry!

Warning: Layer not found in registry!

Change History (3)

comment:1 by mhugent, 16 years ago

I cannot reproduce both problems with r8338. Is this ticket still valid?

Marco

comment:2 by timlinux, 15 years ago

Resolution: fixed
Status: newclosed

I tested the procedure and as or r9471 works fine for me. Closing this ticket.

Regards

Tim

comment:3 by (none), 15 years ago

Milestone: Version 1.0.0

Milestone Version 1.0.0 deleted

Note: See TracTickets for help on using tickets.