Skip to content
Permalink
Browse files
Annotation layers should return true to isEditable, supportsEditing
  • Loading branch information
nyalldawson committed Aug 18, 2021
1 parent d5058ca commit 3f7fc069aea7cd767558ec84f0fb0e26c772714c
@@ -109,6 +109,10 @@ with the layer.

virtual bool readSymbology( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories );

virtual bool isEditable() const;

virtual bool supportsEditing() const;


};

@@ -236,3 +236,14 @@ bool QgsAnnotationLayer::readSymbology( const QDomNode &node, QString &, QgsRead

return true;
}

bool QgsAnnotationLayer::isEditable() const
{
// annotation layers are always editable
return true;
}

bool QgsAnnotationLayer::supportsEditing() const
{
return true;
}
@@ -125,6 +125,8 @@ class CORE_EXPORT QgsAnnotationLayer : public QgsMapLayer
bool writeXml( QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context ) const override;
bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &, StyleCategories categories = AllStyleCategories ) const override;
bool readSymbology( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) override;
bool isEditable() const override;
bool supportsEditing() const override;

private:
QMap<QString, QgsAnnotationItem *> mItems;

0 comments on commit 3f7fc06

Please sign in to comment.