mirror of
https://github.com/overte-org/overte.git
synced 2025-08-13 23:52:31 +02:00
fix for add to world and delete dialog
This commit is contained in:
parent
d077ade350
commit
5167cf69b2
1 changed files with 11 additions and 12 deletions
|
@ -129,7 +129,7 @@ Window {
|
|||
}
|
||||
|
||||
function addToWorld() {
|
||||
var url = assetMappingsModel.data(treeView.currentIndex, 0x102);
|
||||
var url = assetProxyModel.data(treeView.currentIndex, 0x103);
|
||||
if (!url) {
|
||||
return;
|
||||
}
|
||||
|
@ -137,15 +137,16 @@ Window {
|
|||
Entities.addModelEntity(url, MyAvatar.position);
|
||||
}
|
||||
|
||||
function copyURLToClipboard(index) {
|
||||
function copyURLToClipboard() {
|
||||
if (!index) {
|
||||
index = treeView.currentIndex;
|
||||
}
|
||||
var path = assetProxyModel.data(index, 0x103);
|
||||
if (!path) {
|
||||
|
||||
var url = assetProxyModel.data(treeView.currentIndex, 0x103);
|
||||
if (!url) {
|
||||
return;
|
||||
}
|
||||
Window.copyToClipboard(path);
|
||||
Window.copyToClipboard(url);
|
||||
}
|
||||
|
||||
function renameFile(index) {
|
||||
|
@ -188,13 +189,11 @@ Window {
|
|||
var typeString = isFolder ? 'folder' : 'file';
|
||||
|
||||
var object = desktop.messageBox({
|
||||
icon: OriginalDialogs.StandardIcon.Question,
|
||||
buttons: OriginalDialogs.StandardButton.Yes | OriginalDialogs.StandardButton.No,
|
||||
defaultButton: OriginalDialogs.StandardButton.No,
|
||||
text: "Deleting",
|
||||
informativeText: "You are about to delete the following " + typeString + ":\n" +
|
||||
path +
|
||||
"\nDo you want to continue?"
|
||||
icon: hifi.icons.question,
|
||||
buttons: OriginalDialogs.StandardButton.Yes + OriginalDialogs.StandardButton.No,
|
||||
defaultButton: OriginalDialogs.StandardButton.Yes,
|
||||
title: "Delete",
|
||||
text: "You are about to delete the following " + typeString + ":\n" + path + "\nDo you want to continue?"
|
||||
});
|
||||
object.selected.connect(function(button) {
|
||||
if (button === OriginalDialogs.StandardButton.Yes) {
|
||||
|
|
Loading…
Reference in a new issue