mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 04:23:33 +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() {
|
||||
if(uploadOpen) {
|
||||
return;
|
||||
}
|
||||
uploadOpen = true;
|
||||
|
||||
var fileUrl = fileUrlTextField.text
|
||||
var addToWorld = addToWorldCheckBox.checked
|
||||
|
||||
|
@ -230,6 +236,7 @@ Window {
|
|||
|
||||
reload();
|
||||
});
|
||||
uploadOpen = false;
|
||||
}
|
||||
|
||||
function errorMessageBox(message) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue