fix bug: removed painting still stroked after undo