From 0ef13e6c01280b9e16d486b889330e272ac9c3fd Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 9 Jun 2016 14:56:11 +1200 Subject: [PATCH] Fix action button label to be "Save" when saving a file --- interface/resources/qml/dialogs/FileDialog.qml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/interface/resources/qml/dialogs/FileDialog.qml b/interface/resources/qml/dialogs/FileDialog.qml index 89c788a57c..b4558c306b 100644 --- a/interface/resources/qml/dialogs/FileDialog.qml +++ b/interface/resources/qml/dialogs/FileDialog.qml @@ -213,8 +213,6 @@ ModalWindow { function update() { var row = fileTableView.currentRow; - openButton.text = root.selectDirectory && row === -1 ? "Choose" : "Open" - if (row === -1) { if (!root.selectDirectory) { currentSelection.text = ""; @@ -657,7 +655,7 @@ ModalWindow { Action { id: okAction - text: root.saveDialog ? "Save" : (root.selectDirectory ? "Choose" : "Open") + text: currentSelection.text ? (root.selectDirectory && fileTableView.currentRow === -1 ? "Choose" : (root.saveDialog ? "Save" : "Open")) : "Open" enabled: currentSelection.text || !root.selectDirectory && d.currentSelectionIsFolder ? true : false onTriggered: { if (!root.selectDirectory && !d.currentSelectionIsFolder @@ -681,7 +679,6 @@ ModalWindow { return; } - // Handle the ambiguity between different cases // * typed name (with or without extension) // * full path vs relative vs filename only