We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 2b033c1 commit 73afe21Copy full SHA for 73afe21
python/core/qgsmaplayer.sip
@@ -10,10 +10,12 @@ class QgsMapLayer : QObject
10
%End
11
12
%ConvertToSubClassCode
13
- if (sipCpp->inherits("QgsMapLayer"))
+ QgsMapLayer* layer = qobject_cast<QgsMapLayer*>( sipCpp );
14
+
15
+ sipType = 0;
16
17
+ if ( layer )
18
{
- sipType = sipType_QgsMapLayer;
- QgsMapLayer* layer = qobject_cast<QgsMapLayer*>(sipCpp);
19
if (layer->type() == QgsMapLayer::VectorLayer)
20
21
sipType = sipType_QgsVectorLayer;
@@ -27,11 +29,6 @@ class QgsMapLayer : QObject
27
29
sipType = sipType_QgsPluginLayer;
28
30
}
31
- else
- {
32
- sipType = 0;
33
- }
34
-
35
36
37
public:
0 commit comments