Skip to content

Commit bf53e4c

Browse files
committedJun 28, 2016
[style dock] Fix display of extra pages
1 parent f6e67ae commit bf53e4c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5835,7 +5835,6 @@ void QgisApp::setMapStyleDockLayer( QgsMapLayer* layer )
58355835
// the extra work if it's not needed
58365836
if ( mMapStylingDock->isVisible() )
58375837
{
5838-
mMapStyleWidget->setPageFactories( mMapStylePanelFactories );
58395838
mMapStyleWidget->setLayer( layer );
58405839
}
58415840
}
@@ -9121,6 +9120,8 @@ void QgisApp::unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory*
91219120
void QgisApp::registerMapStylePanelFactory( QgsLayerStylingPanelFactory *factory )
91229121
{
91239122
mMapStylePanelFactories << factory;
9123+
if ( mMapStyleWidget )
9124+
mMapStyleWidget->setPageFactories( mMapStylePanelFactories );
91249125
}
91259126

91269127
void QgisApp::unregisterMapStylePanelFactory( QgsLayerStylingPanelFactory *factory )

‎src/app/qgslayerstylingwidget.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ QgsLayerStylingWidget::QgsLayerStylingWidget( QgsMapCanvas* canvas, QList<QgsLay
7070

7171
mStyleManagerFactory = new QgsLayerStyleManagerWidgetFactory();
7272

73+
QList<QgsLayerStylingPanelFactory*> l;
74+
setPageFactories( pages );
75+
7376
connect( mUndoButton, SIGNAL( pressed() ), this, SLOT( undo() ) );
7477
connect( mRedoButton, SIGNAL( pressed() ), this, SLOT( redo() ) );
7578

@@ -168,6 +171,7 @@ void QgsLayerStylingWidget::setLayer( QgsMapLayer *layer )
168171
{
169172
if ( factory->supportsLayer( layer ) )
170173
{
174+
QgsDebugMsg( "MAKING PANEL" );
171175
QListWidgetItem* item = new QListWidgetItem( factory->icon(), QString() );
172176
mOptionsListWidget->addItem( item );
173177
int row = mOptionsListWidget->row( item );

0 commit comments

Comments
 (0)
Please sign in to comment.