You can undo multiple paint strokes in layer-based Paint. In the context of undo, a stroke is whatever you paint on the canvas until you commit.
Do any of the following to commit paint strokes to the undo stack:
For example, if you use a 20-pixel brush to apply several strokes to the canvas and then click Ctrl + Z(for Windows and Linux) or Cmd + Z(for Mac OS), all of the strokes created with this brush are erased. On the other hand, if you press Spacebar between each stroke and then click Ctrl + Z(for Windows and Linux) or Cmd + Z(for Mac OS), the strokes will be erased one at a time.