Skip to content

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

@mikhailtchernychev

Description

@mikhailtchernychev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions