cmu-cs-academy / desktop-cmu-graphics

BSD 3-Clause "New" or "Revised" License
15 stars 9 forks source link

Program crashes when inspector is used on a shape with a RGB gradient fill #84

Closed Yonokid closed 1 month ago

Yonokid commented 1 month ago

Holding control to open the inspector and hovering over a shape with a fill set to a gradient of rgb values causes the program to freeze and the error 'AttributeError: 'rgb' object has no attribute 'attrs'

This fix adds a separate check in the string conversion, checking if it is apart of the RGB class and adding the string representation instead of the class object.

schmave commented 1 month ago

Thank you for this fix as well! We will review and merge soon.