summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-11-26 12:54:56 +0100
committerLiang Qi <liang.qi@qt.io>2016-11-26 12:54:56 +0100
commit84b48cadc8f68d57d1a750e6aec690f46582e0c5 (patch)
tree4a62e3567a2340300db409683b8266bce854d9ae
parent79bd1646a8f317f4c6b5a6342b8aa6056b6c8b79 (diff)
parent8dbb5d994e31bf304c12656171e1d7728650ee03 (diff)
downloadqtquickcontrols-84b48cadc8f68d57d1a750e6aec690f46582e0c5.tar.gz
Merge remote-tracking branch 'origin/5.7' into 5.8
Change-Id: I70641d4226d3851277e5d134bdbc68615b33de6a
-rw-r--r--src/controls/Private/BasicTableView.qml4
-rw-r--r--src/dialogs/DefaultFileDialog.qml4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/controls/Private/BasicTableView.qml b/src/controls/Private/BasicTableView.qml
index 4ec32264..66ad0d36 100644
--- a/src/controls/Private/BasicTableView.qml
+++ b/src/controls/Private/BasicTableView.qml
@@ -474,8 +474,8 @@ ScrollView {
property bool pressed: false
}
}
- property int rowHeight: rowSizeItem.implicitHeight
- property int paddedRowCount: height/rowHeight
+ property int rowHeight: Math.floor(rowSizeItem.implicitHeight)
+ property int paddedRowCount: rowHeight != 0 ? height/rowHeight : 0
y: listView.contentHeight - listView.contentY + listView.originY
width: parent.width
diff --git a/src/dialogs/DefaultFileDialog.qml b/src/dialogs/DefaultFileDialog.qml
index cc663ccb..8911976c 100644
--- a/src/dialogs/DefaultFileDialog.qml
+++ b/src/dialogs/DefaultFileDialog.qml
@@ -472,8 +472,8 @@ AbstractFileDialog {
id: okButton
text: root.selectFolder ? qsTr("Choose") : (selectExisting ? qsTr("Open") : qsTr("Save"))
onClicked: {
- if (view.model.isFolder(view.currentIndex) && !selectFolder)
- dirDown(view.model.get(view.currentIndex, "filePath"))
+ if (view.model.isFolder(view.currentRow) && !selectFolder)
+ dirDown(view.model.get(view.currentRow, "filePath"))
else if (!(root.selectExisting))
currentPathField.doAccept()
else