Cync
[mardrone] / mardrone / imports / com / nokia / meego / SelectionDialog.qml
index fe4d15c..9d4fb10 100644 (file)
@@ -98,6 +98,7 @@ CommonDialog {
                     font: root.platformStyle.itemFont
                 }
                 Component.onCompleted: {
+                   console.debug("SelectionDialog delegate ",name,file)
                     try {
                         // Legacy. "name" used to be the role which was used by delegate
                         itemText.text = name
@@ -169,7 +170,8 @@ CommonDialog {
                 flickableItem: selectionListView
                 platformStyle.inverted: true
             }
-            onModelChanged: selectionContent.listViewHeight = model.count * platformStyle.itemHeight
+            onCountChanged: selectionContent.listViewHeight = (typeof model.count === 'undefined' ? model.length : model.count) * platformStyle.itemHeight
+            onModelChanged: selectionContent.listViewHeight = (typeof model.count === 'undefined' ? model.length : model.count) * platformStyle.itemHeight
         }
 
     }