check buttons state when there are more than one layer CDB-1501
Merge CDB-1501 into release/2.8.2