Skip to content

Commit

Permalink
Merge pull request #997 from jbellister-slac/labels
Browse files Browse the repository at this point in the history
FIX: Don't send the local value of the table's column headers back to the data plugin
  • Loading branch information
YektaY authored May 17, 2023
2 parents 1a0a0c9 + adbc437 commit 504e084
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pydm/widgets/nt_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def value_changed(self, data=None):
labels = list(labels)

try:
values = list(zip(*[v for k, v in data.items()]))
values = list(zip(*[v for k, v in data.items() if k != 'labels']))
except TypeError:
logger.exception("NTTable value items must be iterables.")

Expand Down Expand Up @@ -296,9 +296,11 @@ def send_table(self, row, column, value):
else:
self.value[self._table_labels[column]][row] = value

value_to_send = {k: v for k, v in self.value.items() if k != 'labels'}

# dictionary needs to be wrapped in another dictionary with a key 'value'
# to be passed back to the p4p plugin.
emit_dict = {'value': self.value}
emit_dict = {'value': value_to_send}

self.send_value_signal[dict].emit(emit_dict)
return True
return True

0 comments on commit 504e084

Please sign in to comment.