Skip to content
Snippets Groups Projects
Commit ec69d536 authored by Matthew Andrew's avatar Matthew Andrew
Browse files

Updated unit tests Re #23642

parent 6b6a3dba
No related branches found
No related tags found
No related merge requests found
...@@ -11,4 +11,4 @@ class MuonContext(object): ...@@ -11,4 +11,4 @@ class MuonContext(object):
@data_context.setter @data_context.setter
def data_context(self, value): def data_context(self, value):
self._data_context = value self._data_context = value
\ No newline at end of file
...@@ -8,6 +8,7 @@ from Muon.GUI.Common.observer_pattern import Observable ...@@ -8,6 +8,7 @@ from Muon.GUI.Common.observer_pattern import Observable
pair_columns = ['pair_name', 'group_1', 'group_2', 'alpha'] pair_columns = ['pair_name', 'group_1', 'group_2', 'alpha']
class PairingTablePresenter(object): class PairingTablePresenter(object):
def __init__(self, view, model): def __init__(self, view, model):
...@@ -67,12 +68,9 @@ class PairingTablePresenter(object): ...@@ -67,12 +68,9 @@ class PairingTablePresenter(object):
if not self.validate_alpha(changed_item): if not self.validate_alpha(changed_item):
update_model = False update_model = False
else: else:
self._view.pairing_table.blockSignals(True)
rounded_item = '{:.3f}'.format(float(changed_item)) if '{:.3f}'.format(float(changed_item)) != '0.000'\ rounded_item = '{:.3f}'.format(float(changed_item)) if '{:.3f}'.format(float(changed_item)) != '0.000'\
else '{:.3g}'.format(float(changed_item)) else '{:.3g}'.format(float(changed_item))
table[row][col] = rounded_item
self._view.pairing_table.item(row, col).setText(rounded_item)
self._view.pairing_table.blockSignals(False)
if update_model: if update_model:
self.update_model_from_view(table) self.update_model_from_view(table)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment