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
2121 QObject::connect(nodeList.data(), &NodeList::nodeActivated, this, &EntityScriptServerLogDialog::nodeActivated);
2222 QObject::connect(nodeList.data(), &NodeList::nodeKilled, this, &EntityScriptServerLogDialog::nodeKilled);
2323
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());
2726 }
2827
2928 EntityScriptServerLogDialog::~EntityScriptServerLogDialog() {
3029 enableToEntityServerScriptLog(false);
3130 }
32−void EntityScriptServerLogDialog::shouldEnableLog() {
33− auto nodeList = DependencyManager::get<NodeList>();
34− enableToEntityServerScriptLog(nodeList->getThisNodeCanRez() || nodeList->getThisNodeCanRezTmp());
35−};
36−
3731 void EntityScriptServerLogDialog::enableToEntityServerScriptLog(bool enable) {
3832 auto nodeList = DependencyManager::get<NodeList>();
3933
@@ -63,7 +57,7 @@ void EntityScriptServerLogDialog::handleEntityServerScriptLogPacket(QSharedPoint · 23 unmodified lines
6357 void EntityScriptServerLogDialog::nodeActivated(SharedNodePointer activatedNode) {
6458 if (_subscribed && activatedNode->getType() == NodeType::EntityScriptServer) {
6559 _subscribed = false;
66− shouldEnableLog();
60+ enableToEntityServerScriptLog(DependencyManager::get<NodeList>()->getThisNodeCanRez());
6761 }
6862 }
6963