From 13cd500c2e6d4763393d07dd0dd821e0e05ec5a5 Mon Sep 17 00:00:00 2001 From: Vladyslav Stelmakhovskyi Date: Mon, 20 Mar 2017 20:46:37 +0100 Subject: [PATCH] Make runningscripts able to open even if there is no scripts running --- interface/src/Application.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 9517b69050..b48a247bb1 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -5821,12 +5821,14 @@ bool Application::displayAvatarAttachmentConfirmationDialog(const QString& name) } } -void Application::toggleRunningScriptsWidget() const { - +void Application::toggleRunningScriptsWidget() const { + auto scriptEngines = DependencyManager::get(); + bool _scriptsRunning = !scriptEngines->getRunningScripts().isEmpty(); auto tabletScriptingInterface = DependencyManager::get(); + auto tablet = dynamic_cast(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system")); auto hmd = DependencyManager::get(); - if (tablet->getToolbarMode()) { + if (tablet->getToolbarMode() || false == _scriptsRunning) { static const QUrl url("hifi/dialogs/RunningScripts.qml"); DependencyManager::get()->show(url, "RunningScripts"); } else {