mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 17:29:47 +02:00
Merge pull request #10989 from druiz17/bug-whitespace-script-url
Fixed not being able to load a script url that has a white space
This commit is contained in:
commit
0ba9d65732
1 changed files with 2 additions and 2 deletions
|
@ -6599,11 +6599,11 @@ void Application::setPreviousScriptLocation(const QString& location) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::loadScriptURLDialog() const {
|
void Application::loadScriptURLDialog() const {
|
||||||
auto newScript = OffscreenUi::getText(OffscreenUi::ICON_NONE, "Open and Run Script", "Script URL");
|
QString newScript = OffscreenUi::getText(OffscreenUi::ICON_NONE, "Open and Run Script", "Script URL");
|
||||||
if (QUrl(newScript).scheme() == "atp") {
|
if (QUrl(newScript).scheme() == "atp") {
|
||||||
OffscreenUi::warning("Error Loading Script", "Cannot load client script over ATP");
|
OffscreenUi::warning("Error Loading Script", "Cannot load client script over ATP");
|
||||||
} else if (!newScript.isEmpty()) {
|
} else if (!newScript.isEmpty()) {
|
||||||
DependencyManager::get<ScriptEngines>()->loadScript(newScript);
|
DependencyManager::get<ScriptEngines>()->loadScript(newScript.trimmed());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue