mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix sip subclassing for properties
This commit is contained in:
parent
53ba1a1f10
commit
ef3f61fc17
@ -15,11 +15,11 @@ class QgsAbstractProperty
|
||||
%End
|
||||
|
||||
%ConvertToSubClassCode
|
||||
if (dynamic_cast<QgsStaticProperty*>(sipCpp) != NULL)
|
||||
if ( sipCpp->propertyType() == QgsAbstractProperty::StaticProperty )
|
||||
sipType = sipType_QgsStaticProperty;
|
||||
else if (dynamic_cast<QgsFieldBasedProperty*>(sipCpp) != NULL)
|
||||
else if ( sipCpp->propertyType() == QgsAbstractProperty::FieldBasedProperty )
|
||||
sipType = sipType_QgsFieldBasedProperty;
|
||||
else if (dynamic_cast<QgsExpressionBasedProperty*>(sipCpp) != NULL)
|
||||
else if ( sipCpp->propertyType() == QgsAbstractProperty::ExpressionBasedProperty )
|
||||
sipType = sipType_QgsExpressionBasedProperty;
|
||||
else
|
||||
sipType = sipType_QgsAbstractProperty;
|
||||
|
@ -10,6 +10,16 @@ class QgsAbstractPropertyCollection
|
||||
%TypeHeaderCode
|
||||
#include <qgspropertycollection.h>
|
||||
%End
|
||||
|
||||
%ConvertToSubClassCode
|
||||
if ( dynamic_cast<QgsPropertyCollection*>(sipCpp) )
|
||||
sipType = sipType_QgsPropertyCollection;
|
||||
else if ( dynamic_cast<QgsPropertyCollectionStack*>(sipCpp) )
|
||||
sipType = sipType_QgsPropertyCollectionStack;
|
||||
else
|
||||
sipType = sipType_QgsAbstractPropertyCollection;
|
||||
%End
|
||||
|
||||
public:
|
||||
|
||||
QgsAbstractPropertyCollection( const QString& name = QString() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user