[plasmacomponents] Make SectionScroller follow the ListView.section.criteria

Now it will show first character only if the ListView has FirstCharacter
set

Change-Id: I6d2451d95e36a9a07eed4168402ac5748e87dcb3
Reviewed-by: Marco Martin
This commit is contained in:
Martin Klapetek 2015-05-07 12:56:32 +02:00
parent 01d7343642
commit 02f124b120

View File

@ -106,7 +106,11 @@ Item {
onPositionChanged: {
var section = Sections.closestSection(position/listView.height);
if (section) {
sectionLabel.text = section;
if (listView.section.criteria == ViewSection.FirstCharacter) {
sectionLabel.text = section[0];
} else {
sectionLabel.text = section;
}
}
}