diff --git a/atef/widgets/config/data_active.py b/atef/widgets/config/data_active.py index b7e75bb6..4820dc5c 100644 --- a/atef/widgets/config/data_active.py +++ b/atef/widgets/config/data_active.py @@ -597,6 +597,7 @@ def __init__(self, *args, data=SetValueStep, **kwargs): self.checks_table.add_row(data=check) self.checks_table.cellClicked.connect(self.update_all_desc) + self.checks_table.table_updated.connect(self.nav_to_self) # checkboxes self.bridge.halt_on_fail.changed_value.connect( @@ -652,6 +653,14 @@ def update_all_desc(self, *args, **kwargs): row_widget: CheckRowWidget = self.checks_table.cellWidget(ind, 0) row_widget.update_summary() + def nav_to_self(self): + # A bit of a hack to prevent navigating to details prematurely + # normally an isinstance check would be good, but circular imports + try: + self.parent().parent().full_tree.select_by_data(self.data) + except AttributeError: + return + class TargetRowWidget(DesignerDisplay, SimpleRowWidget): """Base widget with target selection""" diff --git a/atef/widgets/config/utils.py b/atef/widgets/config/utils.py index f7783946..1efe42ef 100644 --- a/atef/widgets/config/utils.py +++ b/atef/widgets/config/utils.py @@ -971,6 +971,7 @@ def make_field(self, value: Any) -> QtWidgets.QWidget: elif isinstance(value, int): int_edit = QtWidgets.QSpinBox() int_edit.setMinimum(-1) + int_edit.setMaximum(2147483648) int_edit.setSpecialValueText('None') int_edit.setToolTip('Input -1 to set value to None') int_edit.setValue(value) @@ -978,6 +979,7 @@ def make_field(self, value: Any) -> QtWidgets.QWidget: elif isinstance(value, float): float_edit = QtWidgets.QDoubleSpinBox() float_edit.setMinimum(-1) + float_edit.setMaximum(2147483648) float_edit.setSpecialValueText('None') float_edit.setToolTip('Input -1 to set value to None') float_edit.setValue(value) diff --git a/docs/source/upcoming_release_notes/259-mnt_timeout_nav.rst b/docs/source/upcoming_release_notes/259-mnt_timeout_nav.rst new file mode 100644 index 00000000..8ece6018 --- /dev/null +++ b/docs/source/upcoming_release_notes/259-mnt_timeout_nav.rst @@ -0,0 +1,23 @@ +259 mnt_timeout_nav +################### + +API Breaks +---------- +- N/A + +Features +-------- +- N/A + +Bugfixes +-------- +- N/A + +Maintenance +----------- +- increase the limit on spinboxes generated from MultiInputFormDialog, in response to a request that set-value-step timeouts not be limited to 99 +- navigate BACK to the parent page when creating a new check in SetValueStep, preventing extra navigation clicks + +Contributors +------------ +- tangkong