3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-26 09:15:25 +02:00

Fix action button label to be "Save" when saving a file

This commit is contained in:
David Rowe 2016-06-09 14:56:11 +12:00
parent 4ae018400d
commit 0ef13e6c01

View file

@ -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