mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-30 00:29:39 -05:00
Handle if the selected layer is not a layer.
This commit is contained in:
parent
5e68d9ab77
commit
57b50cae1d
@ -1288,7 +1288,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipBadLayers
|
||||
connect( mMapStyleWidget, &QgsLayerStylingWidget::styleChanged, this, &QgisApp::updateLabelToolButtons );
|
||||
connect( mMapStyleWidget, &QgsLayerStylingWidget::layerStyleChanged, this, [ = ]( QString styleName )
|
||||
{
|
||||
if ( !QgsMapLayerStyleManager::isDefault( styleName ) )
|
||||
if ( !QgsMapLayerStyleManager::isDefault( styleName ) && styleName.size() != 0 )
|
||||
{
|
||||
mMapStylingDock->setWindowTitle( tr( "Layer Styling (%1)" ).arg( styleName ) );
|
||||
}
|
||||
|
||||
@ -168,6 +168,7 @@ void QgsLayerStylingWidget::setLayer( QgsMapLayer *layer )
|
||||
mStackedWidget->setCurrentIndex( mNotSupportedPage );
|
||||
mLastStyleXml.clear();
|
||||
mCurrentLayer = nullptr;
|
||||
emitLayerStyleChanged( QString() );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user