diff options
| author | Mason Reed <mason@vector35.com> | 2025-10-06 19:05:15 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-10-07 14:11:02 -0400 |
| commit | c92e768dc938e8d9a9a5822222cef6fa52c454c9 (patch) | |
| tree | 14d21b4030e7b98831862b495c9f0ffbc5e675b2 /plugins | |
| parent | dc1094fb4a1f416a5e56bef4941a35bca3506865 (diff) | |
[WARP] Fix rendering of constraint matches in sidebar
Also makes it so that constraints with an exact offset match are displayed differently.
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/warp/ui/shared/constraint.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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; } } |
