Skip to content
Permalink
Browse files

[style dock] Fix display of extra pages

  • Loading branch information
NathanW2 committed Jun 28, 2016
1 parent f6e67ae commit bf53e4ca0b6bc4fd2942633caf314decbc40e5ea
Showing with 6 additions and 1 deletion.
  1. +2 −1 src/app/qgisapp.cpp
  2. +4 −0 src/app/qgslayerstylingwidget.cpp
@@ -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 );
}
}
@@ -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 )
@@ -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() ) );

@@ -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 );

0 comments on commit bf53e4c

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