Skip to content
Permalink
Browse files

Fix QgsMapLayer ConvertToSubClassCode (#3611)

Fix #15683
  • Loading branch information
m-kuhn committed Oct 18, 2016
1 parent 2b033c1 commit 73afe217ec30b8eed625f12a51a0f142f2534681
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 73afe21

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