@@ -26,7 +26,7 @@ Item {
26 readonly property int currentItemIndex: currentItem ? currentItem.ownIndex : -1
26 readonly property int currentItemIndex: currentItem ? currentItem.ownIndex : -1
27 property alias row: row
27 property alias row: row
28 property QtObject indicatorsModel: null
28 property QtObject indicatorsModel: null
29− property var visibleIndicators: defined
29+ property var visibleIndicators: undefined
30 property int overFlowWidth: width
30 property int overFlowWidth: width
31 property bool showAll: false
31 property bool showAll: false
32 property real currentItemOffset: 0.0
32 property real currentItemOffset: 0.0
@@ -94,34 +94,56 @@ Item {
94 property real opacityMultiplier: highlighted ? 1 : (1 - indicatorRow.unitProgress)
94 property real opacityMultiplier: highlighted ? 1 : (1 - indicatorRow.unitProgress)
96 IndicatorItem {
96 IndicatorItem {
97− id: indicatorItem
97+ id: indicatorItem
98− identifier: model.identifier
98+ identifier: model.identifier
99− height: parent.height
99+ height: parent.height
101− dimmed: itemWrapper.dimmed
101+ dimmed: itemWrapper.dimmed
103− widgetSource: model.widgetSource
103+ widgetSource: model.widgetSource
104− indicatorProperties : model.indicatorProperties
104+ indicatorProperties : model.indicatorProperties
106− Component.onCompleted: {
106+ Component.onCompleted: {
107− if (visibleIndicators == undefined) {
107+ updateVisiblility();
108− visibleIndicators = {}
110− indicatorRow.visibleIndicators[model.identifier] = indicatorVisible;
111− indicatorRow.visibleIndicatorsChanged();
113− onIndicatorVisibleChanged: {
109+ onIndicatorVisibleChanged: {
114− if (visibleIndicators == undefined) {
110+ updateVisiblility();
115− visibleIndicators = {}
111+
117− indicatorRow.visibleIndicators[model.identifier] = indicatorVisible;
118− indicatorRow.visibleIndicatorsChanged();
120− if (indicatorVisible) {
112+ if (indicatorVisible) {
121− showAll = true;
113+ showAll = true;
122− allVisible.start();
114+ allVisible.start();
118+ function updateVisiblility() {
119+ if (visibleIndicators == undefined) {
120+ visibleIndicators = {}
122+ indicatorRow.visibleIndicators[model.identifier] = indicatorVisible;
124+ // removed current index?
125+ if (indicatorRow.currentItemIndex === index && !indicatorVisible) {
126+ // find the next closest visible indicator (after current, else before)
128+ for (var i = index+1; i < rowRepeater.count; i++) {
129+ if (indicatorRow.visibleIndicators[i] === undefined || indicatorRow.visibleIndicators[model.identifier]) {
134+ if (newIndex === -1) {
135+ for (i = index - 1; i >= 0; i--) {
136+ if (indicatorRow.visibleIndicators[i] === undefined || indicatorRow.visibleIndicators[model.identifier]) {
142+ indicatorRow.setCurrentItem(newIndex);
145+ indicatorRow.visibleIndicatorsChanged();
127 states: [
149 states: [