Skip to content

Commit

Permalink
Fix crash in test
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 20, 2020
1 parent 9482b1b commit 7b61f08
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/gui/mesh/qgsmeshlayerproperties.cpp
Expand Up @@ -116,19 +116,12 @@ QgsMeshLayerProperties::QgsMeshLayerProperties( QgsMapLayer *lyr, QgsMapCanvas *
mOptStackedWidget->indexOf( mOptsPage_Style ) );
}

QString title = tr( "Layer Properties — %1" ).arg( lyr->name() );

if ( !mMeshLayer->styleManager()->isDefault( mMeshLayer->styleManager()->currentStyle() ) )
title += QStringLiteral( " (%1)" ).arg( mMeshLayer->styleManager()->currentStyle() );
restoreOptionsBaseUi( title );

//Add help page references
mOptsPage_Information->setProperty( "helpPage", QStringLiteral( "working_with_mesh/mesh_properties.html#information-properties" ) );
mOptsPage_Source->setProperty( "helpPage", QStringLiteral( "working_with_mesh/mesh_properties.html#source-properties" ) );
mOptsPage_Style->setProperty( "helpPage", QStringLiteral( "working_with_mesh/mesh_properties.html#symbology-properties" ) );
mOptsPage_Rendering->setProperty( "helpPage", QStringLiteral( "working_with_mesh/mesh_properties.html#rendering-properties" ) );


mBtnStyle = new QPushButton( tr( "Style" ) );
QMenu *menuStyle = new QMenu( this );
menuStyle->addAction( tr( "Load Style…" ), this, &QgsMeshLayerProperties::loadStyle );
Expand All @@ -147,6 +140,12 @@ QgsMeshLayerProperties::QgsMeshLayerProperties( QgsMapLayer *lyr, QgsMapCanvas *
mActionSaveMetadataAs = menuMetadata->addAction( tr( "Save Metadata…" ), this, &QgsMeshLayerProperties::saveMetadataAs );
mBtnMetadata->setMenu( menuMetadata );
buttonBox->addButton( mBtnMetadata, QDialogButtonBox::ResetRole );

QString title = tr( "Layer Properties — %1" ).arg( lyr->name() );

if ( !mMeshLayer->styleManager()->isDefault( mMeshLayer->styleManager()->currentStyle() ) )
title += QStringLiteral( " (%1)" ).arg( mMeshLayer->styleManager()->currentStyle() );
restoreOptionsBaseUi( title );
}

void QgsMeshLayerProperties::addPropertiesPageFactory( QgsMapLayerConfigWidgetFactory *factory )
Expand Down

0 comments on commit 7b61f08

Please sign in to comment.