modify
Modifies an existing MeasurementValueConfiguration in the current document. Any measurement annotations that use the original configuration will be updated, too. On top of that, it is checked if the modified value matches an already existing configuration. In that case a dialog is displayed and asks how to proceed. If the dialog is confirmed with "Use Existing" the provided callback `onSelectedExistingConfiguration` informs about the used configuration. The original configuration will be deleted in this case.
Return
true
if the configuration could be modified to `newValue`, otherwise false
which indicates that a dialog was displayed to resolve the conflict.
Parameters
The context to be used if we need to show a dialog.
The original MeasurementValueConfiguration to be changed.
The value to change it to.
callback which is called if `newValue` matches an already existing configuration and the user decides to use that one instead of `newValue`.
Replaces the `oldValue` configuration straightforward in the document's configuration list with `newValue`. No checks are being made, no dialogs displayed.
Parameters
The original MeasurementValueConfiguration to be changed.
The value to change it to.
if true
all measurement annotations that use the scale and precision of `oldValue` will be updated to the scale and precision of `newValue`.
Set to true
if the modification is supposed to be recorded to the undo stack.