If active_layer not in settings then set it to first visible layer when opening a file
Fix toggling of visibility via the checkbox