layer edit button bug fixed

Reported by Jan Garrevoet