Ticket #2123: fix_broken_display_profiles.diff

File fix_broken_display_profiles.diff, 855 bytes (added by skamithi, 19 years ago)

when you select a option from the transcombosetting, it sets the current value to the current label. this causes the label to be added to the database instead of the value. potential fix find the value attached to the label and uses that instead.

  • libs/libmyth/settings.cpp

     
    652652    }
    653653
    654654    if (select || !isSet)
    655         setValue(value);
     655        setValue(label);
    656656}
    657657
    658658bool SelectSetting::removeSelection(const QString &label, QString value)
     
    714714    {
    715715        current = found;
    716716        isSet   = true;
    717         Setting::setValue(newValue);
     717        Setting::setValue(values[found]);
    718718    }
    719719}
    720720
     
    748748{
    749749    int ret = 0;
    750750
    751     selectionList::const_iterator it = values.begin();
    752     for (; it != values.end(); ++it, ++ret)
     751    selectionList::const_iterator it = labels.begin();
     752    for (; it != labels.end(); ++it, ++ret)
    753753    {
    754754        if (*it == value)
    755755            return ret;