Showing the changes to interface/src/ui/EntityScriptServerLogDialog.cpp (1 of 3 files). Show all
Unified · Split
| @@ -21,19 +21,13 @@ EntityScriptServerLogDialog::EntityScriptServerLogDialog(QWidget* parent) : Base · 20 unmodified lines | ||
| 21 | 21 | QObject::connect(nodeList.data(), &NodeList::nodeActivated, this, &EntityScriptServerLogDialog::nodeActivated); |
| 22 | 22 | QObject::connect(nodeList.data(), &NodeList::nodeKilled, this, &EntityScriptServerLogDialog::nodeKilled); |
| 23 | 23 | |
| 24 | − QObject::connect(nodeList.data(), &NodeList::canRezChanged, this, &EntityScriptServerLogDialog::shouldEnableLog); | |
| 25 | − QObject::connect(nodeList.data(), &NodeList::canRezTmpChanged, this, &EntityScriptServerLogDialog::shouldEnableLog); | |
| 26 | − shouldEnableLog(); | |
| 24 | + QObject::connect(nodeList.data(), &NodeList::canRezChanged, this, &EntityScriptServerLogDialog::enableToEntityServerScriptLog); | |
| 25 | + enableToEntityServerScriptLog(nodeList->getThisNodeCanRez()); | |
| 27 | 26 | } |
| 28 | 27 | |
| 29 | 28 | EntityScriptServerLogDialog::~EntityScriptServerLogDialog() { |
| 30 | 29 | enableToEntityServerScriptLog(false); |
| 31 | 30 | } |
| 32 | −void EntityScriptServerLogDialog::shouldEnableLog() { | |
| 33 | − auto nodeList = DependencyManager::get<NodeList>(); | |
| 34 | − enableToEntityServerScriptLog(nodeList->getThisNodeCanRez() || nodeList->getThisNodeCanRezTmp()); | |
| 35 | −}; | |
| 36 | − | |
| 37 | 31 | void EntityScriptServerLogDialog::enableToEntityServerScriptLog(bool enable) { |
| 38 | 32 | auto nodeList = DependencyManager::get<NodeList>(); |
| 39 | 33 | |
| @@ -63,7 +57,7 @@ void EntityScriptServerLogDialog::handleEntityServerScriptLogPacket(QSharedPoint · 23 unmodified lines | ||
| 63 | 57 | void EntityScriptServerLogDialog::nodeActivated(SharedNodePointer activatedNode) { |
| 64 | 58 | if (_subscribed && activatedNode->getType() == NodeType::EntityScriptServer) { |
| 65 | 59 | _subscribed = false; |
| 66 | − shouldEnableLog(); | |
| 60 | + enableToEntityServerScriptLog(DependencyManager::get<NodeList>()->getThisNodeCanRez()); | |
| 67 | 61 | } |
| 68 | 62 | } |
| 69 | 63 | |