summaryrefslogtreecommitdiff
path: root/retrace
diff options
context:
space:
mode:
authorMark Janes <mark.a.janes@intel.com>2017-10-31 14:34:54 -0700
committerMark Janes <mark.a.janes@intel.com>2017-11-27 11:29:20 -0800
commitaf7612e02e8c16e4a6b1477288024e6d2b7aa874 (patch)
treeaecf6f97e4262e59c93faaf9a896c2ed9b61d79b /retrace
parent5ffcea07a2d6368455694a90977c441b00afebe8 (diff)
State: Allow conflicting values for color channels
Multiple selection may result in differening color channels for state settings. When a value is indeterminate, "###" is displayed. The user may still override the color channel when portions of the state are indeterminate.
Diffstat (limited to 'retrace')
-rw-r--r--retrace/daemon/ui/glframe_state_model.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/retrace/daemon/ui/glframe_state_model.cpp b/retrace/daemon/ui/glframe_state_model.cpp
index a8a9caa7..8316bb5a 100644
--- a/retrace/daemon/ui/glframe_state_model.cpp
+++ b/retrace/daemon/ui/glframe_state_model.cpp
@@ -112,9 +112,12 @@ QStateValue::insert(const std::string &red,
if (m_value != color) {
// selected renders have different values
- for (auto c : color)
- c = "###";
- m_value = color;
+ QStringList tmp = m_value.value<QStringList>();
+ for (int i = 0; i < 4; ++i) {
+ if (tmp[i] != color[i])
+ tmp[i] = "###";
+ }
+ m_value = tmp;
}
}