Factorize code and correct the double update for slider-spinbox associations.