Skip to content
Permalink
Browse files

Fix QgsMapLayer ConvertToSubClassCode (#3611)

Fix #15683
  • Loading branch information
m-kuhn committed Oct 17, 2016
1 parent 8fa3127 commit 03f08a6c79fc4016d7ed0b89262d916cb3b70bab
Showing with 5 additions and 8 deletions.
  1. +5 −8 python/core/qgsmaplayer.sip
@@ -10,10 +10,12 @@ class QgsMapLayer : QObject
%End

%ConvertToSubClassCode
if (sipCpp->inherits("QgsMapLayer"))
QgsMapLayer* layer = qobject_cast<QgsMapLayer*>( sipCpp );

sipType = 0;

if ( layer )
{
sipType = sipType_QgsMapLayer;
QgsMapLayer* layer = qobject_cast<QgsMapLayer*>(sipCpp);
if (layer->type() == QgsMapLayer::VectorLayer)
{
sipType = sipType_QgsVectorLayer;
@@ -27,11 +29,6 @@ class QgsMapLayer : QObject
sipType = sipType_QgsPluginLayer;
}
}
else
{
sipType = 0;
}

%End

public:

0 comments on commit 03f08a6

Please sign in to comment.
You can’t perform that action at this time.