use layer instead of layerindex
update spinbox when selection changes
emit selectedLayersArrayChanged
bugfix/cleanup itemspinbox and friends