From c92e768dc938e8d9a9a5822222cef6fa52c454c9 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Mon, 6 Oct 2025 19:05:15 -0400 Subject: [WARP] Fix rendering of constraint matches in sidebar Also makes it so that constraints with an exact offset match are displayed differently. --- plugins/warp/ui/shared/constraint.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins/warp/ui/shared/constraint.cpp') diff --git a/plugins/warp/ui/shared/constraint.cpp b/plugins/warp/ui/shared/constraint.cpp index 47bf2b33..c871fc68 100644 --- a/plugins/warp/ui/shared/constraint.cpp +++ b/plugins/warp/ui/shared/constraint.cpp @@ -41,13 +41,14 @@ QVariant WarpConstraintItemModel::data(const QModelIndex &index, int role) const { auto itemConstraint = item->GetConstraint(); // TODO: We really should store the guid in a hashmap or something instead of looping over it for every item. - // TODO: Take into account the constraint offset. for (const auto &constraint: m_matchedConstraints) { - if (constraint.offset == itemConstraint.offset) + if (constraint.guid == itemConstraint.guid) { static QColor matchedColor = getThemeColor(GreenStandardHighlightColor); - matchedColor.setAlpha(128); + matchedColor.setAlpha(100); + if (constraint.offset == itemConstraint.offset) + matchedColor.setAlpha(128); return matchedColor; } } -- cgit v1.3.1