Fix #1120, inconsistent undo for line/area drawing

Gulp!