Make sure Upload is not clicked several times

This commit is contained in:
Atlante45 2016-03-10 14:57:02 -08:00
parent 548d826a4e
commit 63571a7c36
2 changed files with 8 additions and 0 deletions

View file

@ -212,7 +212,13 @@ Window {
});
}
property var uploadOpen: false;
function uploadClicked() {
if(uploadOpen) {
return;
}
uploadOpen = true;
var fileUrl = fileUrlTextField.text
var addToWorld = addToWorldCheckBox.checked
@ -230,6 +236,7 @@ Window {
reload();
});
uploadOpen = false;
}
function errorMessageBox(message) {

View file

@ -83,6 +83,7 @@ void AssetMappingsScriptingInterface::getMapping(QString path, QJSValue callback
void AssetMappingsScriptingInterface::uploadFile(QString path, QString mapping, QJSValue callback) {
auto offscreenUi = DependencyManager::get<OffscreenUi>();
auto result = offscreenUi->inputDialog(OffscreenUi::ICON_NONE, "Enter asset path:", "", mapping);
if (!result.isValid()) {
return;
}