Singleband pseudoclor min max reset

Issue #1392 on hold
Benjamin Jakimow created an issue

If EnMAP-box is installed, a changed min/max range of the Singlenband pseudo color range will be reset when clicking on the Layer Properties “Apply” button.

Comments (2)

  1. Benjamin Jakimow reporter

    A final fix requires some updates in the QgsRasterLayerProperty dialog.
    The problem is caused by the order how the QgsRasterLayerProperties dialog applies changes of plugin dialogs:
    QgsRasterLayerProperties::apply() first applies changes of plugin dialogs

      // apply all plugin dialogs
      for ( QgsMapLayerConfigWidget *page : std::as_const( mLayerPropertiesPages ) )
      {
        page->apply();
      }
    

    Following to that, changes to the layer renderer are set by:

      //set renderer from widget
      QgsRasterRendererWidget *rendererWidget = dynamic_cast<QgsRasterRendererWidget *>( mRendererStackedWidget->currentWidget() );
      if ( rendererWidget )
      {
        rendererWidget->doComputations();
    
        mRasterLayer->setRenderer( rendererWidget->renderer() );
      }
    

    So far there is now way that the “Raster Band” plugin gets aware of changes to the renderer widget before these changes are applied to the raster layer, i.e. apply() has been finished.

  2. Log in to comment