fixed loading script whitespace

This commit is contained in:
Dante Ruiz 2017-07-18 17:59:42 +01:00
parent 2dfaf7b02a
commit 976fec66f8

View file

@ -6599,11 +6599,11 @@ void Application::setPreviousScriptLocation(const QString& location) {
}
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") {
OffscreenUi::warning("Error Loading Script", "Cannot load client script over ATP");
} else if (!newScript.isEmpty()) {
DependencyManager::get<ScriptEngines>()->loadScript(newScript);
DependencyManager::get<ScriptEngines>()->loadScript(newScript.trimmed());
}
}