Skip to content

Commit

Permalink
Do not throw warning on invalid layers
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Dec 7, 2019
1 parent cfbe664 commit 05da49a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -13402,7 +13402,8 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionAddFeature->setText( addFeatureText );
mActionAddFeature->setToolTip( addFeatureText );
QgsGui::shortcutsManager()->unregisterAction( mActionAddFeature );
QgsGui::shortcutsManager()->registerAction( mActionAddFeature, mActionAddFeature->shortcut() );
if ( !mActionAddFeature->text().isEmpty() ) // The text will be empty on unkown geometry type -> in this case do not create a shortcut
QgsGui::shortcutsManager()->registerAction( mActionAddFeature, mActionAddFeature->shortcut() );
}
else
{
Expand Down
4 changes: 3 additions & 1 deletion src/core/layout/qgslayoutitemattributetable.cpp
Expand Up @@ -799,7 +799,9 @@ bool QgsLayoutItemAttributeTable::readPropertiesFromElement( const QDomElement &
mVectorLayer.resolveWeakly( mLayout->project() );

//connect to new layer
connect( sourceLayer(), &QgsVectorLayer::layerModified, this, &QgsLayoutTable::refreshAttributes );
QgsVectorLayer *newLayer = sourceLayer();
if ( newLayer )
connect( sourceLayer(), &QgsVectorLayer::layerModified, this, &QgsLayoutTable::refreshAttributes );

refreshAttributes();

Expand Down

0 comments on commit 05da49a

Please sign in to comment.