History

Only users with perm rez can see the log

Atlante45 committed 9 years ago

Commit 0f393561 parent 35f8afe3 files · +4 −12Browse files

Showing the changes to interface/src/ui/EntityScriptServerLogDialog.cpp (1 of 3 files). Show all

Unified · Split

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