summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Hein <hein@kde.org>2017-01-30 09:34:24 (GMT)
committerEike Hein <hein@kde.org>2017-01-30 09:34:24 (GMT)
commitdb0723ab7086016367196ad15fced7b4e7edcc9d (patch)
treed18f2c60af204659880e04bdd8d16d2758bb0fa4
parent3568d8e4a8a2cc4fac7fccb86132c47be37495f6 (diff)
Fix startup warning introduced in 3568d8e4.
-rw-r--r--containments/desktop/package/contents/ui/FolderView.qml12
1 files changed, 8 insertions, 4 deletions
diff --git a/containments/desktop/package/contents/ui/FolderView.qml b/containments/desktop/package/contents/ui/FolderView.qml
index 620209e..898d721 100644
--- a/containments/desktop/package/contents/ui/FolderView.qml
+++ b/containments/desktop/package/contents/ui/FolderView.qml
@@ -561,14 +561,18 @@ Item {
}
onCachedRectangleSelectionChanged: {
- if (cachedRectangleSelection && cachedRectangleSelection.length) {
+ if (cachedRectangleSelection == null) {
+ return;
+ }
+
+ if (cachedRectangleSelection.length) {
// Set current index to start of selection.
// cachedRectangleSelection is pre-sorted.
currentIndex = cachedRectangleSelection[0];
- }
- dir.updateSelection(cachedRectangleSelection.map(positioner.map),
- gridView.ctrlPressed);
+ dir.updateSelection(cachedRectangleSelection.map(positioner.map),
+ gridView.ctrlPressed);
+ }
}
function makeIconSize() {