MikeSiLVO/script.skinshortcuts

propertyfallback Values Not Being Written Correctly

Closed this issue ยท 4 comments

@anxdpanic Perhaps one more you can assist with fixing.

When troubleshooting the update, I noticed that propertyfallback values from my overrides.xml were being parsed correctly in the GUI, but not being written to the XML with the same values. The XML was always using the last fallback value with no attribute matching even though the match was present.

I believe this is due to how has_property_fallback ( https://github.com/mikesilvo164/script.skinshortcuts/blob/master/resources/lib/skinshorcuts/property_utils.py#L47 ) is called from each location.

My workaround for now is to place the following code at the top of the has_property_fallback function

def has_fallback_property(fallback_property, match_properties):
    if isinstance(match_properties, list):
        match_properties = dict(match_properties)
    ...

This change then causes the XML to be written with the same values the GUI displays.

thanks for the report, will be very helpful! this was next on my list to dig into ๐Ÿ‘ I'm hoping before the end of the week to have it resolved ๐Ÿคž

Looks good. Thanks for the fix!

It was your fix, I just applied it ๐Ÿ˜„ So thank you again, I'll be submitting a new version to the official repository shortly.