Support undo painting