mozman / ezdxf

Python interface to DXF
https://ezdxf.mozman.at
MIT License
912 stars 191 forks source link

Allows setting/resetting `entity.rgb` to `None` #1116

Closed kkkkkom closed 3 months ago

kkkkkom commented 3 months ago

Hi, @mozman , could you please review this minor merge request?

I think we should allow entity.rgb to be set/reset to None.

Many entity rgbs are initially None by default, and this change will allow users/developers to temporarily set rgb and reset it back without causing an error.

pytest has passed clean locally.

kkkkkom commented 3 months ago

This is not the correct way.

If you rally need this feature implement the @rgb.deleter method and check if the attrib true_color exists otherwise a DXFAttributeError will be raised.

Thanks for reviewing, I'll update accordingly

kkkkkom commented 3 months ago

Hi, @mozman , could you please review again?

mozman commented 3 months ago

@kkkkkom thanks for the idea, to speed up the process I added all the necessary changes myself

kkkkkom commented 3 months ago

@kkkkkom thanks for the idea, to speed up the process I added all the necessary changes myself

Thanks!