Skip to content

Commit

Permalink
Add sip cast code for QgsAnnotationLayer
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 5, 2020
1 parent bc745a1 commit 4c04254
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/core/auto_generated/qgsmaplayer.sip.in
Expand Up @@ -58,6 +58,9 @@ This is the base class for all map layer types (vector, raster).
case QgsMapLayerType::VectorTileLayer:
sipType = sipType_QgsVectorTileLayer;
break;
case QgsMapLayerType::AnnotationLayer:
sipType = sipType_QgsAnnotationLayer;
break;
default:
sipType = nullptr;
break;
Expand Down
2 changes: 2 additions & 0 deletions src/core/expression/qgsexpressionfunction.cpp
Expand Up @@ -5086,6 +5086,8 @@ static QVariant fcnGetLayerProperty( const QVariantList &values, const QgsExpres
return QCoreApplication::translate( "expressions", "Vector Tile" );
case QgsMapLayerType::PluginLayer:
return QCoreApplication::translate( "expressions", "Plugin" );
case QgsMapLayerType::AnnotationLayer:
return QCoreApplication::translate( "expressions", "Annotation" );
}
}
else
Expand Down
1 change: 1 addition & 0 deletions src/core/layertree/qgslayertreemodel.cpp
Expand Up @@ -209,6 +209,7 @@ QVariant QgsLayerTreeModel::data( const QModelIndex &index, int role ) const

case QgsMapLayerType::VectorLayer:
case QgsMapLayerType::PluginLayer:
case QgsMapLayerType::AnnotationLayer:
break;
}

Expand Down
3 changes: 3 additions & 0 deletions src/core/qgsmaplayer.h
Expand Up @@ -113,6 +113,9 @@ class CORE_EXPORT QgsMapLayer : public QObject
case QgsMapLayerType::VectorTileLayer:
sipType = sipType_QgsVectorTileLayer;
break;
case QgsMapLayerType::AnnotationLayer:
sipType = sipType_QgsAnnotationLayer;
break;
default:
sipType = nullptr;
break;
Expand Down

0 comments on commit 4c04254

Please sign in to comment.