mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +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() {
|
||||
var row = fileTableView.currentRow;
|
||||
|
||||
openButton.text = root.selectDirectory && row === -1 ? "Choose" : "Open"
|
||||
|
||||
if (row === -1) {
|
||||
openFolderButton.enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -224,7 +225,6 @@ ModalWindow {
|
|||
} else {
|
||||
currentSelection.text = "";
|
||||
}
|
||||
openFolderButton.enabled = currentSelectionIsFolder
|
||||
}
|
||||
|
||||
function navigateUp() {
|
||||
|
@ -637,16 +637,6 @@ ModalWindow {
|
|||
Keys.onReturnPressed: okAction.trigger()
|
||||
KeyNavigation.up: 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
|
||||
}
|
||||
|
||||
|
@ -654,7 +644,7 @@ ModalWindow {
|
|||
id: cancelButton
|
||||
action: cancelAction
|
||||
KeyNavigation.up: selectionType
|
||||
KeyNavigation.left: openFolderButton
|
||||
KeyNavigation.left: openButton
|
||||
KeyNavigation.right: fileTableView.contentItem
|
||||
Keys.onReturnPressed: { canceled(); root.enabled = false }
|
||||
}
|
||||
|
@ -663,8 +653,15 @@ ModalWindow {
|
|||
Action {
|
||||
id: okAction
|
||||
text: root.saveDialog ? "Save" : (root.selectDirectory ? "Choose" : "Open")
|
||||
enabled: currentSelection.text ? true : false
|
||||
onTriggered: okActionTimer.start();
|
||||
enabled: currentSelection.text || !root.selectDirectory && d.currentSelectionIsFolder ? true : false
|
||||
onTriggered: {
|
||||
if (!root.selectDirectory && !d.currentSelectionIsFolder
|
||||
|| root.selectDirectory && fileTableView.currentRow === -1) {
|
||||
okActionTimer.start();
|
||||
} else {
|
||||
fileTableView.navigateToCurrentRow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
@ -724,12 +721,6 @@ ModalWindow {
|
|||
}
|
||||
}
|
||||
|
||||
Action {
|
||||
id: openFolderAction
|
||||
text: "Open Folder"
|
||||
onTriggered: { fileTableView.navigateToCurrentRow(); }
|
||||
}
|
||||
|
||||
Action {
|
||||
id: cancelAction
|
||||
text: "Cancel"
|
||||
|
|
Loading…
Reference in a new issue