undo on gallery change