~renatofilho/camera-app/unity8-snap

« back to all changes in this revision

Viewing changes to OptionsOverlay.qml

  • Committer: Florian Boucault
  • Date: 2016-08-12 14:31:56 UTC
  • Revision ID: florian.boucault@canonical.com-20160812143156-lapx0g7u1jemdxr4
Support non numerical camera device IDs and more than 2 cameras. Fixes app not showing viewfinder on desktop.

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
                iconName: (model && model.icon) ? model.icon : ""
116
116
                selected: optionsRepeater.model.selectedIndex == index
117
117
                isLast: index === optionsRepeater.count - 1
118
 
                onClicked: settings[optionsRepeater.model.settingsProperty] = optionsRepeater.model.get(index).value
 
118
                onClicked: {
 
119
                    if (optionsRepeater.model.setSettingProperty) {
 
120
                        optionsRepeater.model.setSettingProperty(optionsRepeater.model.get(index).value);
 
121
                    } else {
 
122
                        settings[optionsRepeater.model.settingsProperty] = optionsRepeater.model.get(index).value;
 
123
                    }
 
124
                }
119
125
            }
120
126
        }
121
127
    }