mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 20:56:52 +02:00
Make sure Upload is not clicked several times
This commit is contained in:
parent
548d826a4e
commit
63571a7c36
2 changed files with 8 additions and 0 deletions
|
@ -212,7 +212,13 @@ Window {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property var uploadOpen: false;
|
||||||
function uploadClicked() {
|
function uploadClicked() {
|
||||||
|
if(uploadOpen) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uploadOpen = true;
|
||||||
|
|
||||||
var fileUrl = fileUrlTextField.text
|
var fileUrl = fileUrlTextField.text
|
||||||
var addToWorld = addToWorldCheckBox.checked
|
var addToWorld = addToWorldCheckBox.checked
|
||||||
|
|
||||||
|
@ -230,6 +236,7 @@ Window {
|
||||||
|
|
||||||
reload();
|
reload();
|
||||||
});
|
});
|
||||||
|
uploadOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function errorMessageBox(message) {
|
function errorMessageBox(message) {
|
||||||
|
|
|
@ -83,6 +83,7 @@ void AssetMappingsScriptingInterface::getMapping(QString path, QJSValue callback
|
||||||
void AssetMappingsScriptingInterface::uploadFile(QString path, QString mapping, QJSValue callback) {
|
void AssetMappingsScriptingInterface::uploadFile(QString path, QString mapping, QJSValue callback) {
|
||||||
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
||||||
auto result = offscreenUi->inputDialog(OffscreenUi::ICON_NONE, "Enter asset path:", "", mapping);
|
auto result = offscreenUi->inputDialog(OffscreenUi::ICON_NONE, "Enter asset path:", "", mapping);
|
||||||
|
|
||||||
if (!result.isValid()) {
|
if (!result.isValid()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue