From 1cd7dd622f641c852acf37e6b661230f1c914b84 Mon Sep 17 00:00:00 2001 From: "moneromooo.monero" Date: Fri, 30 Dec 2016 10:10:02 +0000 Subject: [PATCH] StandardDropdown: fix for empty model --- components/StandardDropdown.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/StandardDropdown.qml b/components/StandardDropdown.qml index f5c81796..b3820501 100644 --- a/components/StandardDropdown.qml +++ b/components/StandardDropdown.qml @@ -107,7 +107,7 @@ Item { font.bold: true font.pixelSize: 12 color: "#FFFFFF" - text: repeater.model.get(column.currentIndex).column1 + text: column.currentIndex < repeater.model.rowCount() ? repeater.model.get(column.currentIndex).column1 : "" } Text { @@ -119,7 +119,7 @@ Item { font.family: "Arial" font.pixelSize: 12 color: "#FFFFFF" - text: repeater.model.get(column.currentIndex).column2 + text: column.currentIndex < repeater.model.rowCount() ? repeater.model.get(column.currentIndex).column2 : "" property int w: 0 Component.onCompleted: w = implicitWidth