remove

Deletes the provided configuration from the document. If it's currently in use by any measurement annotations, a dialog is displayed and this function returns false. If the user decides via the dialog to delete the configuration anyways, the operation proceeds and will also delete those affected annotations. If the function returns true, the configuration was not in use and was deleted without further ado.

Return

true if the configuration could be deleted right away, otherwise false which indicates that a dialog was displayed, informing the user that the configuration is used by at least one measurement annotation.

Parameters

context

The context to be used if we need to show a dialog.

value

The MeasurementValueConfiguration to be removed from the document.


abstract fun remove(@NonNull value: MeasurementValueConfiguration, deleteAssociatedAnnotations: Boolean, addToUndo: Boolean)

Deletes the `value` configuration from the document's configuration list. No checks are being made, no dialogs displayed.

Parameters

value

The MeasurementValueConfiguration to be removed from the document.

deleteAssociatedAnnotations

if true all measurement annotations that use the scale and precision of `value` will be deleted as well.

addToUndo

Set to true if the delete operation is supposed to be recorded to the undo stack.