fix #LINQT-1433 highlight and position view at current index meeting list
This commit is contained in:
parent
0b193de0bb
commit
733702b781
3 changed files with 3 additions and 5 deletions
|
|
@ -88,9 +88,9 @@ void ConferenceInfoList::setSelf(QSharedPointer<ConferenceInfoList> me) {
|
||||||
// int index2;
|
// int index2;
|
||||||
// get(mLastConfInfoInserted.get(), &index2);
|
// get(mLastConfInfoInserted.get(), &index2);
|
||||||
if (index != -1) setCurrentDateIndex(index);
|
if (index != -1) setCurrentDateIndex(index);
|
||||||
else setCurrentDateIndex(mHaveCurrentDate ? currentDateIndex + 1 : currentDateIndex);
|
else setCurrentDateIndex(mHaveCurrentDate ? currentDateIndex : currentDateIndex + 1);
|
||||||
mLastConfInfoInserted = nullptr;
|
mLastConfInfoInserted = nullptr;
|
||||||
} else setCurrentDateIndex(mHaveCurrentDate ? currentDateIndex + 1 : currentDateIndex);
|
} else setCurrentDateIndex(mHaveCurrentDate ? currentDateIndex : currentDateIndex + 1);
|
||||||
delete items;
|
delete items;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ ListView {
|
||||||
}
|
}
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
selectedConference = model.getAt(currentIndex) || null
|
selectedConference = model.getAt(currentIndex) || null
|
||||||
|
positionViewAtIndex(currentIndex, ListView.Center)
|
||||||
}
|
}
|
||||||
onVisibleChanged: if( visible) {
|
onVisibleChanged: if( visible) {
|
||||||
mainItem.positionViewAtIndex(currentIndex, ListView.Center)// First approximative move
|
mainItem.positionViewAtIndex(currentIndex, ListView.Center)// First approximative move
|
||||||
|
|
|
||||||
|
|
@ -188,9 +188,6 @@ AbstractMainPage {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
||||||
preferredHighlightBegin: height/2 - 10
|
|
||||||
preferredHighlightEnd: height/2 + 10
|
|
||||||
highlightRangeMode: ListView.ApplyRange
|
|
||||||
onCountChanged: mainItem.meetingListCount = count
|
onCountChanged: mainItem.meetingListCount = count
|
||||||
searchBarText: searchBar.text
|
searchBarText: searchBar.text
|
||||||
Keys.onPressed: (event) => {
|
Keys.onPressed: (event) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue