mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-17 22:08:27 +02:00
signal from ignoreNodesInRadius
This commit is contained in:
parent
00b94860cf
commit
b37feb20de
2 changed files with 5 additions and 7 deletions
|
@ -751,6 +751,7 @@ bool NodeList::sockAddrBelongsToDomainOrNode(const HifiSockAddr& sockAddr) {
|
|||
}
|
||||
|
||||
void NodeList::ignoreNodesInRadius(float radiusToIgnore, bool enabled) {
|
||||
bool isEnabledChange = _ignoreRadiusEnabled.get() != enabled;
|
||||
_ignoreRadiusEnabled.set(enabled);
|
||||
_ignoreRadius.set(radiusToIgnore);
|
||||
|
||||
|
@ -759,6 +760,9 @@ void NodeList::ignoreNodesInRadius(float radiusToIgnore, bool enabled) {
|
|||
}, [this](const SharedNodePointer& destinationNode) {
|
||||
sendIgnoreRadiusStateToNode(destinationNode);
|
||||
});
|
||||
if (isEnabledChange) {
|
||||
emit ignoreRadiusEnabledChanged(enabled);
|
||||
}
|
||||
}
|
||||
|
||||
void NodeList::sendIgnoreRadiusStateToNode(const SharedNodePointer& destinationNode) {
|
||||
|
@ -886,9 +890,3 @@ void NodeList::muteNodeBySessionID(const QUuid& nodeID) {
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
void NodeList::toggleIgnoreRadius() {
|
||||
bool isIgnored = !getIgnoreRadiusEnabled();
|
||||
ignoreNodesInRadius(getIgnoreRadius(), isIgnored);
|
||||
emit ignoreRadiusEnabledChanged(isIgnored);
|
||||
}
|
|
@ -74,7 +74,7 @@ public:
|
|||
void ignoreNodesInRadius(float radiusToIgnore, bool enabled = true);
|
||||
float getIgnoreRadius() const { return _ignoreRadius.get(); }
|
||||
bool getIgnoreRadiusEnabled() const { return _ignoreRadiusEnabled.get(); }
|
||||
void toggleIgnoreRadius();
|
||||
void toggleIgnoreRadius() { ignoreNodesInRadius(getIgnoreRadius(), !getIgnoreRadiusEnabled()); }
|
||||
void enableIgnoreRadius() { ignoreNodesInRadius(getIgnoreRadius(), true); }
|
||||
void disableIgnoreRadius() { ignoreNodesInRadius(getIgnoreRadius(), false); }
|
||||
void ignoreNodeBySessionID(const QUuid& nodeID);
|
||||
|
|
Loading…
Reference in a new issue