mirror of
https://github.com/overte-org/overte.git
synced 2025-04-24 21:55:53 +02:00
Merge pull request #101 from birarda/atp-mappings
fix add to world after upload name change
This commit is contained in:
commit
4d2797c25a
2 changed files with 4 additions and 4 deletions
|
@ -238,7 +238,7 @@ Window {
|
|||
var directory = path ? path.slice(0, path.lastIndexOf('/') + 1) : "/";
|
||||
var filename = fileUrl.slice(fileUrl.lastIndexOf('/') + 1);
|
||||
|
||||
Assets.uploadFile(fileUrl, directory + filename, function(err) {
|
||||
Assets.uploadFile(fileUrl, directory + filename, function(err, path) {
|
||||
if (err) {
|
||||
console.log("Asset Browser - error uploading: ", fileUrl, " - error ", err);
|
||||
var box = errorMessage("There was an error uploading:\n" + fileUrl + "\n" + Assets.getErrorString(err));
|
||||
|
@ -247,7 +247,7 @@ Window {
|
|||
console.log("Asset Browser - finished uploading: ", fileUrl);
|
||||
|
||||
if (shouldAddToWorld) {
|
||||
addToWorld("atp:" + directory + filename);
|
||||
addToWorld("atp:" + path);
|
||||
}
|
||||
|
||||
reload();
|
||||
|
|
|
@ -54,7 +54,7 @@ void AssetMappingsScriptingInterface::setMapping(QString path, QString hash, QJS
|
|||
|
||||
connect(request, &SetMappingRequest::finished, this, [this, callback](SetMappingRequest* request) mutable {
|
||||
if (callback.isCallable()) {
|
||||
QJSValueList args { uint8_t(request->getError()) };
|
||||
QJSValueList args { uint8_t(request->getError()), request->getPath() };
|
||||
callback.call(args);
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) {
|
|||
}
|
||||
|
||||
if (callback.isCallable()) {
|
||||
QJSValueList args { uint8_t(request->getError()) };
|
||||
QJSValueList args { uint8_t(request->getError()), map };
|
||||
callback.call(args);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue