mirror of
https://github.com/overte-org/overte.git
synced 2025-07-06 16:09:41 +02:00
Remove "Open Folder" button
This commit is contained in:
parent
4da1c0ac4d
commit
c4aed1ce06
1 changed files with 12 additions and 21 deletions
|
@ -212,8 +212,9 @@ ModalWindow {
|
||||||
function update() {
|
function update() {
|
||||||
var row = fileTableView.currentRow;
|
var row = fileTableView.currentRow;
|
||||||
|
|
||||||
|
openButton.text = root.selectDirectory && row === -1 ? "Choose" : "Open"
|
||||||
|
|
||||||
if (row === -1) {
|
if (row === -1) {
|
||||||
openFolderButton.enabled = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,7 +225,6 @@ ModalWindow {
|
||||||
} else {
|
} else {
|
||||||
currentSelection.text = "";
|
currentSelection.text = "";
|
||||||
}
|
}
|
||||||
openFolderButton.enabled = currentSelectionIsFolder
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function navigateUp() {
|
function navigateUp() {
|
||||||
|
@ -637,16 +637,6 @@ ModalWindow {
|
||||||
Keys.onReturnPressed: okAction.trigger()
|
Keys.onReturnPressed: okAction.trigger()
|
||||||
KeyNavigation.up: selectionType
|
KeyNavigation.up: selectionType
|
||||||
KeyNavigation.left: selectionType
|
KeyNavigation.left: selectionType
|
||||||
KeyNavigation.right: openFolderButton
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
|
||||||
id: openFolderButton
|
|
||||||
text: "Open Folder"
|
|
||||||
enabled: false
|
|
||||||
action: openFolderAction
|
|
||||||
KeyNavigation.up: selectionType
|
|
||||||
KeyNavigation.left: openButton
|
|
||||||
KeyNavigation.right: cancelButton
|
KeyNavigation.right: cancelButton
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -654,7 +644,7 @@ ModalWindow {
|
||||||
id: cancelButton
|
id: cancelButton
|
||||||
action: cancelAction
|
action: cancelAction
|
||||||
KeyNavigation.up: selectionType
|
KeyNavigation.up: selectionType
|
||||||
KeyNavigation.left: openFolderButton
|
KeyNavigation.left: openButton
|
||||||
KeyNavigation.right: fileTableView.contentItem
|
KeyNavigation.right: fileTableView.contentItem
|
||||||
Keys.onReturnPressed: { canceled(); root.enabled = false }
|
Keys.onReturnPressed: { canceled(); root.enabled = false }
|
||||||
}
|
}
|
||||||
|
@ -663,8 +653,15 @@ ModalWindow {
|
||||||
Action {
|
Action {
|
||||||
id: okAction
|
id: okAction
|
||||||
text: root.saveDialog ? "Save" : (root.selectDirectory ? "Choose" : "Open")
|
text: root.saveDialog ? "Save" : (root.selectDirectory ? "Choose" : "Open")
|
||||||
enabled: currentSelection.text ? true : false
|
enabled: currentSelection.text || !root.selectDirectory && d.currentSelectionIsFolder ? true : false
|
||||||
onTriggered: okActionTimer.start();
|
onTriggered: {
|
||||||
|
if (!root.selectDirectory && !d.currentSelectionIsFolder
|
||||||
|
|| root.selectDirectory && fileTableView.currentRow === -1) {
|
||||||
|
okActionTimer.start();
|
||||||
|
} else {
|
||||||
|
fileTableView.navigateToCurrentRow();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
|
@ -724,12 +721,6 @@ ModalWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Action {
|
|
||||||
id: openFolderAction
|
|
||||||
text: "Open Folder"
|
|
||||||
onTriggered: { fileTableView.navigateToCurrentRow(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
id: cancelAction
|
id: cancelAction
|
||||||
text: "Cancel"
|
text: "Cancel"
|
||||||
|
|
Loading…
Reference in a new issue