vtkCubeSource / vtkBoxWidget coupling issue

Alright, I think I figured it out.
The boxWidget’s callback function applies the transform to the cube actor by

obj.GetProp3D().SetUserTransform(t)

(see: https://examples.vtk.org/site/Python/Widgets/BoxWidget/)
apparently, this transform is upheld as long as it is not overwritten or anything. Before hitting the update button, the actor shows the original bounds + transform as adjusted with the boxWidget. However, when updating the bounds with the new ones, the actor keeps its userTransform properties, effectively showing the original bounds + transform + transform (again!), which explains why increasing the length by 1 m, makes it bigger by two meters.

I was able to fix it, by overwriting the userTransform with an empty transformation object and updating the boxWidget and the cubeSource bounds later with the values from the QLineInputs.

# empty transform
t = vtkTransform()
cubeActor.SetUserTransform(t)
boxWidget.SetTransform(t)