Skip to content

Commit

Permalink
Merge pull request #1729 from HEXRD/check-valid-value
Browse files Browse the repository at this point in the history
Ensure valid value in tree view checking
  • Loading branch information
psavery authored Sep 27, 2024
2 parents 83fbb0f + 4168275 commit 766a88e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hexrdgui/calibration/tree_item_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def data(self, index, role):
# If a value hit the boundary, color both the boundary and the
# value red.
item = self.get_item(index)
if not item.child_items:
if not item.child_items and item.data(self.VALUE_IDX) is not None:
atol = 1e-3
pairs = [
(self.VALUE_IDX, self.MAX_IDX),
Expand Down Expand Up @@ -86,7 +86,7 @@ def data(self, index, role):
if role == Qt.ForegroundRole and index.column() in self.BOUND_INDICES:
# If a delta is zero, color both the delta and the value red.
item = self.get_item(index)
if not item.child_items:
if not item.child_items and item.data(self.VALUE_IDX) is not None:
atol = 1e-3
if abs(item.data(self.DELTA_IDX)) < atol:
return QColor('red')
Expand Down

0 comments on commit 766a88e

Please sign in to comment.