Skip to content
Permalink
Browse files

Fix raster style dock widgets not opened with dock mode flag

Makes the color picker and ramp editors open inline for
the raster properties pages
  • Loading branch information
nyalldawson committed Oct 5, 2016
1 parent 3e1536f commit 79fd6fa0ac9f078c916d90fbfc2ff458206008cf
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/app/qgslayerstylingwidget.cpp
@@ -334,6 +334,7 @@ void QgsLayerStylingWidget::updateCurrentWidgetLayer()
if ( panel )
{
connect( panel, SIGNAL( widgetChanged( QgsPanelWidget* ) ), this, SLOT( autoApply() ) );
panel->setDockMode( true );
mWidgetStack->addMainPanel( panel );
}
}
@@ -385,12 +386,14 @@ void QgsLayerStylingWidget::updateCurrentWidgetLayer()
{
case 0: // Style
mRasterStyleWidget = new QgsRendererRasterPropertiesWidget( rlayer, mMapCanvas, mWidgetStack );
mRasterStyleWidget->setDockMode( true );
connect( mRasterStyleWidget, SIGNAL( widgetChanged() ), this, SLOT( autoApply() ) );
mWidgetStack->addMainPanel( mRasterStyleWidget );
break;
case 1: // Transparency
{
QgsRasterTransparencyWidget* transwidget = new QgsRasterTransparencyWidget( rlayer, mMapCanvas, mWidgetStack );
transwidget->setDockMode( true );
connect( transwidget, SIGNAL( widgetChanged() ), this, SLOT( autoApply() ) );
mWidgetStack->addMainPanel( transwidget );
break;
@@ -412,6 +415,7 @@ void QgsLayerStylingWidget::updateCurrentWidgetLayer()
connect( widget, SIGNAL( widgetChanged() ), this, SLOT( autoApply() ) );
QString name = mRasterStyleWidget->currentRenderWidget()->renderer()->type();
widget->setRendererWidget( name, mRasterStyleWidget->currentRenderWidget() );
widget->setDockMode( true );

mWidgetStack->addMainPanel( widget );
}

0 comments on commit 79fd6fa

Please sign in to comment.
You can’t perform that action at this time.