mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 14:47:41 +02:00
error message boxes for mapping errors
This commit is contained in:
parent
55248bc076
commit
f1919031de
1 changed files with 23 additions and 2 deletions
|
@ -48,7 +48,13 @@ Window {
|
||||||
console.log("Deleting " + path);
|
console.log("Deleting " + path);
|
||||||
|
|
||||||
Assets.deleteMappings(path, function(err) {
|
Assets.deleteMappings(path, function(err) {
|
||||||
print("Finished deleting path: ", path, err);
|
if (err) {
|
||||||
|
console.log("Error deleting path: ", path, err);
|
||||||
|
errorMessage("There was an error deleting:\n" + path + "\n\nPlease try again.");
|
||||||
|
} else {
|
||||||
|
console.log("Finished deleting path: ", path);
|
||||||
|
}
|
||||||
|
|
||||||
reload();
|
reload();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -62,7 +68,13 @@ Window {
|
||||||
console.log("Renaming " + oldPath + " to " + newPath);
|
console.log("Renaming " + oldPath + " to " + newPath);
|
||||||
|
|
||||||
Assets.renameMapping(oldPath, newPath, function(err) {
|
Assets.renameMapping(oldPath, newPath, function(err) {
|
||||||
print("Finished rename: ", err);
|
if (err) {
|
||||||
|
console.log("Error renaming: ", oldPath, "=>", newPath, " - error ", err);
|
||||||
|
errorMessage("There was an error renaming:\n" + oldPath + " to " + newPath + "\n\nPlease try again.");
|
||||||
|
} else {
|
||||||
|
console.log("Finished rename: ", oldPath, "=>", newPath);
|
||||||
|
}
|
||||||
|
|
||||||
reload();
|
reload();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -199,6 +211,15 @@ Window {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function errorMessage(message) {
|
||||||
|
desktop.messageBox({
|
||||||
|
icon: OriginalDialogs.StandardIcon.Error,
|
||||||
|
buttons: OriginalDialogs.StandardButton.Ok,
|
||||||
|
text: "Error",
|
||||||
|
informativeText: message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
width: pane.contentWidth
|
width: pane.contentWidth
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue