Bug report #11576
Composer legend not responding to pyqgis commands
|Affected QGIS version:||2.6.0||Regression?:||No|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||invalid|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||19838|
I am working on a plugin which among other things produces maps based on a series of map templates, each one with a main map and an overview map. Each template also has a legend which is intended to be linked to the main map. The plugin is designed to enable non-expert users to create well laid out maps.
In QGIS 2.2 and 2.4, the following pyqgis code worked as expected, ensuring the legend lists each layer in the canvas at that time:
Later in the code I change the set of layers so that I can store a different layer set for the overview map.
Using the same code in QGIS 2.6, the legend does not have any layers listed. Many of the target users will be put off by having to manipulate the legend themselves.
#1 Updated by Giovanni Manghi about 5 years ago
- Status changed from Open to Feedback
- Category set to Map Composer/Printing
Legend in composer has also been subject of several developments in qgis 2.6, so probably something must change in your code. Seems more appropriate for a question on the developers mailing list rather than classifying this as a bug.