summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-11-17 10:04:14 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2016-11-17 09:10:41 +0000
commiteb2df59fb203668734d652808c74b0504864cc1e (patch)
tree4c54f3ef580898e4de8b40d53d127692bdf254f9 /src
parentfccb5baf490b9a8c561a01f30b4992236e3a2060 (diff)
downloadqtquickcontrols-eb2df59fb203668734d652808c74b0504864cc1e.tar.gz
DefaultFileDialog: check cur selection properly on okButton clicked
TableView has currentRow not currentIndex. Task-number: QTBUG-56663 Change-Id: I9376354364bc843d118a672fcd1d9dfbba8e775c Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/dialogs/DefaultFileDialog.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dialogs/DefaultFileDialog.qml b/src/dialogs/DefaultFileDialog.qml
index 02815f17..394e04a3 100644
--- a/src/dialogs/DefaultFileDialog.qml
+++ b/src/dialogs/DefaultFileDialog.qml
@@ -469,8 +469,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