MostafaElAyoubi / Data-shapes

code for revit, dynamo
49 stars 12 forks source link

Listview default value indices shifted #35

Closed andydandy74 closed 6 years ago

andydandy74 commented 6 years ago

Hi @MostafaElAyoubi, in Data-Shapes 2018.5.6 the default value indices are shifted by 1. This can lead to the form not displaying in cases where the last item in the list is included in the list of default value indices. I would have created a pull request, but it seems this repository is not up to date with what is available on the package manager. The issue is caused in line 525 of UI.MultiInputForm++:

                for i in j.default_values:
                    defInd = lvItems.index([x for x in j.keys() if not (x == 'inputname' or x == 'height' or x == 'highlight' or x == 'display_mode' or x == 'element_count' or x == 'default_values' or x == 'sorted' or i == 'showId')][i])
                    lv.Items[defInd].Checked = True

Just replace i == 'showId' with x == 'showId'.

MostafaElAyoubi commented 6 years ago

Hi @andydandy74 ! thanks for pointing this out. You're right the repository is not up to date, so i'll fix that too :) . I'll keep you posted when it's done.

MostafaElAyoubi commented 6 years ago

Okay issue fixed and github repository updated

andydandy74 commented 6 years ago

Thanks!