planetfederal / qgis-suite-plugin

GNU General Public License v2.0
25 stars 17 forks source link

Refresh of 'QGIS Layers', 'Groups' or 'Styles' does nothing #168

Closed dakcarto closed 9 years ago

dakcarto commented 9 years ago

Possible duplicate of #3?

Nothing happens when selecting QGIS Layers, Groups or Styles in panel and clicking Refresh button:

opengeo-expl_qgis-layers

To replicate:

  1. Start with several layers loaded in QGIS project
  2. Rename one of the layers in QGIS's layer legend
  3. Select QGIS Layers in panel and click Refresh button

    -> layera are not reloaded, i.e. listed layer names do not change

  4. Select 'QGIS project' in panel and click Refresh button

    -> layers are reloaded and show updated layer name

Same happens (or doesn't) for Groups or Styles. Maybe just connect those section's refresh to refreshing QGIS project.

Looks like QGIS layer and group renaming signals need connected to refreshing QGIS project as well.

Also, there is no contextual menu for any of the QGIS project sub-sections.

minskmaz commented 8 years ago

how does one refresh the layers tree programmatically ? layer.triggerRepaint() updates the colors in the maps but not the Layer's Panel

luipir commented 8 years ago

hi @minskmaz

remember this is a plugin, doe not belong to PyQGIS apis.

you need to get the reference of the plugin GUI and execute the refresh methods of the GUI: https://github.com/boundlessgeo/suite-qgis-plugin/blob/e5256a7a90c85f33b48b14ddf317a8bf767d8566/src/opengeo/gui/exploreritems.py#L16