Undo removes selection

Migrated from https://bugs.launchpad.net/inkscape/+bug/170394

Steps to reproduce:

  • open Inkscape
  • create 2 rectangles
  • select both
  • apply action (subtract them from each other: "Path -> Difference" (Ctrl+-)
  • undo

What happened?

  • there are two rectangles again - not selected

What should have happened?

  • the rectangles should re-appear selected, just as before the undo

Inkscape Version and Operating System:

  • Inkscape Version: 1.0alpha (1:0.92.0+devel+201904112206+331007d)
  • Operating System: Ubuntu
  • Operating System version: 18.10

selection-loss