Skip to content

Commit

Permalink
[style dock] Fix display of extra pages
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Jun 28, 2016
1 parent f6e67ae commit bf53e4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -5835,7 +5835,6 @@ void QgisApp::setMapStyleDockLayer( QgsMapLayer* layer )
// the extra work if it's not needed
if ( mMapStylingDock->isVisible() )
{
mMapStyleWidget->setPageFactories( mMapStylePanelFactories );
mMapStyleWidget->setLayer( layer );
}
}
Expand Down Expand Up @@ -9121,6 +9120,8 @@ void QgisApp::unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory*
void QgisApp::registerMapStylePanelFactory( QgsLayerStylingPanelFactory *factory )
{
mMapStylePanelFactories << factory;
if ( mMapStyleWidget )
mMapStyleWidget->setPageFactories( mMapStylePanelFactories );
}

void QgisApp::unregisterMapStylePanelFactory( QgsLayerStylingPanelFactory *factory )
Expand Down
4 changes: 4 additions & 0 deletions src/app/qgslayerstylingwidget.cpp
Expand Up @@ -70,6 +70,9 @@ QgsLayerStylingWidget::QgsLayerStylingWidget( QgsMapCanvas* canvas, QList<QgsLay

mStyleManagerFactory = new QgsLayerStyleManagerWidgetFactory();

QList<QgsLayerStylingPanelFactory*> l;
setPageFactories( pages );

connect( mUndoButton, SIGNAL( pressed() ), this, SLOT( undo() ) );
connect( mRedoButton, SIGNAL( pressed() ), this, SLOT( redo() ) );

Expand Down Expand Up @@ -168,6 +171,7 @@ void QgsLayerStylingWidget::setLayer( QgsMapLayer *layer )
{
if ( factory->supportsLayer( layer ) )
{
QgsDebugMsg( "MAKING PANEL" );
QListWidgetItem* item = new QListWidgetItem( factory->icon(), QString() );
mOptionsListWidget->addItem( item );
int row = mOptionsListWidget->row( item );
Expand Down

0 comments on commit bf53e4c

Please sign in to comment.