geopython / geopython/CadTools

Cad tools does not work with latest development QGIS - cannot create layer

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
24
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Hi,

I just recently came across the problem with latest QGIS. When I create parallel line
Cad tools is asking about CS for new layer (twice), than the following message appears
in Python console

fixed
0.1
Traceback (most recent call last):
File "C:/Users/misha/.qgis2/python/plugins\cadtools\tools\parallellinetool.py", line 142, in createParallelLine
cadutils.addGeometryToCadLayer(g)
File "C:/Users/misha/.qgis2/python/plugins\cadtools\tools\cadutils.py", line 38, in addGeometryToCadLayer
QgsMapLayerRegistry().instance().addMapLayer(vl, True)
TypeError: qgis._core.QgsMapLayerRegistry cannot be instantiated or sub-classed
fixed
0.1
Traceback (most recent call last):
File "C:/Users/misha/.qgis2/python/plugins\cadtools\tools\parallellinetool.py", line 142, in createParallelLine
cadutils.addGeometryToCadLayer(g)
File "C:/Users/misha/.qgis2/python/plugins\cadtools\tools\cadutils.py", line 38, in addGeometryToCadLayer
QgsMapLayerRegistry().instance().addMapLayer(vl, True)
TypeError: qgis._core.QgsMapLayerRegistry cannot be instantiated or sub-classed

CadLayer is not created.

Plugin works fine with released 2.4.0 version.

Thank you
Mikhail

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.