Skip to content

Commit

Permalink
Fix inverted polygon renderer widget not opening colors and other
Browse files Browse the repository at this point in the history
panels inline in style dock
  • Loading branch information
nyalldawson committed Jun 4, 2019
1 parent b2d3bfc commit ddd3361
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ Constructor
virtual void setContext( const QgsSymbolWidgetContext &context );


virtual void setDockMode( bool dockMode );


protected:

};
Expand Down
9 changes: 9 additions & 0 deletions src/gui/symbology/qgsinvertedpolygonrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ void QgsInvertedPolygonRendererWidget::setContext( const QgsSymbolWidgetContext
mEmbeddedRendererWidget->setContext( context );
}

void QgsInvertedPolygonRendererWidget::setDockMode( bool dockMode )
{
QgsRendererWidget::setDockMode( dockMode );
if ( mEmbeddedRendererWidget )
mEmbeddedRendererWidget->setDockMode( dockMode );
}

void QgsInvertedPolygonRendererWidget::mRendererComboBox_currentIndexChanged( int index )
{
QString rendererId = mRendererComboBox->itemData( index ).toString();
Expand All @@ -128,6 +135,8 @@ void QgsInvertedPolygonRendererWidget::mRendererComboBox_currentIndexChanged( in
mEmbeddedRendererWidget.reset( m->createRendererWidget( mLayer, mStyle, const_cast<QgsFeatureRenderer *>( mRenderer->embeddedRenderer() )->clone() ) );
connect( mEmbeddedRendererWidget.get(), &QgsRendererWidget::widgetChanged, this, &QgsInvertedPolygonRendererWidget::widgetChanged );
mEmbeddedRendererWidget->setContext( mContext );
mEmbeddedRendererWidget->setDockMode( this->dockMode() );
connect( mEmbeddedRendererWidget.get(), &QgsPanelWidget::showPanel, this, &QgsPanelWidget::openPanel );

if ( layout()->count() > 2 )
{
Expand Down
2 changes: 2 additions & 0 deletions src/gui/symbology/qgsinvertedpolygonrendererwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class GUI_EXPORT QgsInvertedPolygonRendererWidget : public QgsRendererWidget, pr

void setContext( const QgsSymbolWidgetContext &context ) override;

void setDockMode( bool dockMode ) override;

protected:
//! The mask renderer
std::unique_ptr<QgsInvertedPolygonRenderer> mRenderer;
Expand Down

0 comments on commit ddd3361

Please sign in to comment.