Draft: TaurusValueLineEdit pending operations handling

We recently had some debate about the handling of pending operations in TaurusForm. Currently, the behavior is as follows (example with a TaurusLabel as read widget and TaurusValueLineEdit as write widget):

  1. If user edits the value in the write widget, it is marked (blue highlight) as pending operation, since display value differs from rvalue. The value can then be applied by pressing Enter key or the Apply button.
  2. If the value of the TaurusAttribute changes externally, the read widget updates accordingly. However, the write widget does not update, so its value differs from the current rvalue and is marked as a pending operation, even though the user did nothing. Clicking Apply will write this outdated value (remember that clicking Apply will apply all pending operations)

We discussed whether behaviour (2) is correct. If the user hasn’t made any changes, there shouldn't be any pending operations.

We’ve tested a new behavior (currently only in TaurusValueLineEdit) that marks a value as pending only if the widget value is being or has been edited by the user, not for external changes. If the value changes externally and the widget value has not been edited by the user, the write widget is automatically updated (like the read widget), and no pending operation is shown.

This MR is still in draft and currently implements the logic only for TaurusValueLineEdit. Ideally, this behavior should be extended to other write widgets.

What do you think of this change? Does it make sense to you?

Merge request reports

Loading