I didn't get to resolve the bug which prevent the line pattern selected from the toolbar to be applied to the entity. It seems to be a problem of casting to base class in Lua.
When add method MetaInfo is called with selected line pattern, the name function seems to be called instead of metaTypeID one, and the cast to DxfLinePattern is impossible.

I tried to add two methods in Lua :

  • EntityMetaType metaTypeID() => return line pattern name
  • DxfLinePattern metaTypeID() => returns "_LINEPATTERN" which is correct

I began the work on unit tests, what will be tested
for layers:

  • Creation
  • Selection
  • Edition
  • Remove

for line patterns:

  • Creation
  • Edition
  • Copy
  • Selection
  • Remove