Skip to content

Commit

Permalink
fix #751 invalid DXF attribute name
Browse files Browse the repository at this point in the history
  • Loading branch information
mozman committed Oct 10, 2022
1 parent ac5ea38 commit 289d932
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Expand Up @@ -14,6 +14,8 @@ Version 1.0.0b0 - dev
fix keyword only argument in virtual_block_reference_entities() call
- BUGFIX: [#749](https://github.com/mozman/ezdxf/issues/749)
fix infinite loop in MTEXT rendering with tabulators
- BUGFIX: [#751](https://github.com/mozman/ezdxf/issues/751)
fix invalid DXF attribute name

Version 0.18.1 - 2022-09-03
---------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/ezdxf/entities/xdict.py
Expand Up @@ -188,7 +188,7 @@ def add_dictionary(
doc = dictionary.doc
assert doc is not None, "valid DXF document required"
new_dict = doc.objects.add_dictionary(
owner=dictionary.dxf.hande,
owner=dictionary.dxf.handle,
hard_owned=hard_owned,
)
dictionary[name] = new_dict
Expand Down
10 changes: 10 additions & 0 deletions tests/test_01_dxf_entities/test_104_extension_dict.py
Expand Up @@ -120,3 +120,13 @@ def test_link_dxf_object_to_extension_dict(doc):
xdict.link_dxf_object("MyEntry", obj)
assert "MyEntry" in xdict
assert obj.dxf.owner == owner


def test_add_new_dictionary_to_xdict(doc):
# issue #751
msp = doc.modelspace()
line = msp.add_line((0, 0), (1, 0))
xdict = line.new_extension_dict()
new_dict = xdict.add_dictionary("TEST")
assert new_dict.dxf.owner == xdict.handle

0 comments on commit 289d932

Please sign in to comment.