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 open inline for the raster properties pages

(cherry-picked from 79fd6fa)
  • Loading branch information
nyalldawson committed Oct 6, 2016
1 parent dfbbc02 commit 7eccb43
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/qgslayerstylingwidget.cpp
Expand Up @@ -332,6 +332,7 @@ void QgsLayerStylingWidget::updateCurrentWidgetLayer()
if ( panel )
{
connect( panel, SIGNAL( widgetChanged( QgsPanelWidget* ) ), this, SLOT( autoApply() ) );
panel->setDockMode( true );
mWidgetStack->addMainPanel( panel );
}
}
Expand Down Expand Up @@ -383,12 +384,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 @@ -410,6 +413,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 7eccb43

Please sign in to comment.