Skip to content

Commit

Permalink
Fix raster style dock widgets not opened with dock mode flag
Browse files Browse the repository at this point in the history
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 79fd6fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/qgslayerstylingwidget.cpp
Expand Up @@ -334,6 +334,7 @@ void QgsLayerStylingWidget::updateCurrentWidgetLayer()
if ( panel )
{
connect( panel, SIGNAL( widgetChanged( QgsPanelWidget* ) ), this, SLOT( autoApply() ) );
panel->setDockMode( true );
mWidgetStack->addMainPanel( panel );
}
}
Expand Down Expand Up @@ -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;
Expand All @@ -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 );
}
Expand Down

0 comments on commit 79fd6fa

Please sign in to comment.