From 058faa8c0f54474995d621cc69f2285cf46f77b8 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 21 Mar 2017 10:03:22 -0700 Subject: [PATCH 1/2] Row color bugfix --- interface/resources/qml/hifi/Pal.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/resources/qml/hifi/Pal.qml b/interface/resources/qml/hifi/Pal.qml index b4b041587b..b52dce5841 100644 --- a/interface/resources/qml/hifi/Pal.qml +++ b/interface/resources/qml/hifi/Pal.qml @@ -596,7 +596,7 @@ Rectangle { id: nameCard; // Properties profileUrl: (model && model.profileUrl) || ""; - imageMaskColor: rowColor(styleData.selected, styleData.row % 2, model.isPresent); + imageMaskColor: rowColor(styleData.selected, styleData.row % 2, model ? model.isPresent : false); displayName: styleData.value; userName: model ? model.userName : ""; connectionStatus: model ? model.connection : ""; @@ -903,7 +903,7 @@ Rectangle { rowDelegate: Rectangle { // Size height: rowHeight; - color: rowColor(styleData.selected, styleData.alternate, model ? model.isPresent : true); + color: rowColor(styleData.selected, styleData.alternate, true); } // This Item refers to the contents of each Cell @@ -916,7 +916,7 @@ Rectangle { // Properties visible: styleData.role === "userName"; profileUrl: (model && model.profileUrl) || ""; - imageMaskColor: rowColor(styleData.selected, styleData.row % 2, model.isPresent); + imageMaskColor: rowColor(styleData.selected, styleData.row % 2, true); displayName: ""; userName: model ? model.userName : ""; connectionStatus : model ? model.connection : ""; From 78f1acfd622cd0f2044cf2c830618b549e4321ce Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 21 Mar 2017 10:45:51 -0700 Subject: [PATCH 2/2] Don't crash when ignoring not-present node --- assignment-client/src/avatars/AvatarMixer.cpp | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixer.cpp b/assignment-client/src/avatars/AvatarMixer.cpp index d2bfdde7ea..9ea2ea3f10 100644 --- a/assignment-client/src/avatars/AvatarMixer.cpp +++ b/assignment-client/src/avatars/AvatarMixer.cpp @@ -437,17 +437,20 @@ void AvatarMixer::handleNodeIgnoreRequestPacket(QSharedPointer while (message->getBytesLeftToRead()) { // parse out the UUID being ignored from the packet QUuid ignoredUUID = QUuid::fromRfc4122(message->readWithoutCopy(NUM_BYTES_RFC4122_UUID)); - // Reset the lastBroadcastTime for the ignored avatar to 0 - // so the AvatarMixer knows it'll have to send identity data about the ignored avatar - // to the ignorer if the ignorer unignores. - nodeData->setLastBroadcastTime(ignoredUUID, 0); - // Reset the lastBroadcastTime for the ignorer (FROM THE PERSPECTIVE OF THE IGNORED) to 0 - // so the AvatarMixer knows it'll have to send identity data about the ignorer - // to the ignored if the ignorer unignores. - auto ignoredNode = nodeList->nodeWithUUID(ignoredUUID); - AvatarMixerClientData* ignoredNodeData = reinterpret_cast(ignoredNode->getLinkedData()); - ignoredNodeData->setLastBroadcastTime(senderNode->getUUID(), 0); + if (nodeList->nodeWithUUID(ignoredUUID)) { + // Reset the lastBroadcastTime for the ignored avatar to 0 + // so the AvatarMixer knows it'll have to send identity data about the ignored avatar + // to the ignorer if the ignorer unignores. + nodeData->setLastBroadcastTime(ignoredUUID, 0); + + // Reset the lastBroadcastTime for the ignorer (FROM THE PERSPECTIVE OF THE IGNORED) to 0 + // so the AvatarMixer knows it'll have to send identity data about the ignorer + // to the ignored if the ignorer unignores. + auto ignoredNode = nodeList->nodeWithUUID(ignoredUUID); + AvatarMixerClientData* ignoredNodeData = reinterpret_cast(ignoredNode->getLinkedData()); + ignoredNodeData->setLastBroadcastTime(senderNode->getUUID(), 0); + } if (addToIgnore) { senderNode->addIgnoredNode(ignoredUUID);