Lock & unlock history
Add history functions about layer