"restore last selection" for pcbnew and eeschema
Description
Currently, a selection is cleared by several actions, like pressing ESC in response to a mistake, clicking next to the selection, hitting a shortcut for another tool not acting on the selection. A recent addition has lessened the number of occasions where a selection is lost (#5356 (closed)), however
- When in doubt, there is currently no way to view the unselected board halfway through a complex selection.
- It seems currently there is no way to restore a selection that isn't involved in an undo.
- In the case of undo, the new behavior is such that the selection is restored, but it is again lost when doing a redo.
Storing the last selection with > 1 item and providing "restore last selection" (e.g. as CTRL+SHIFT+Y in analogy to "Redo") would remove the penalties for user error and introduce new ways to clarify selections and their relation to the rest of the design, like
- grabbing and moving a selection to explore its air wires and connections that can be aborted without being completed and subsequently undone,
- reverting to an unselected board view during a complex selection process
- performing other single component operations like locking vias and footprints or moving them out of the way at the target site of a move operation
Steps to reproduce
- open a board or schematic
- right-click to open the popup menu, press ESC to abort without loss of selection
- click next to selection, the selection is lost
- alternatively to 3., press ESC again
Version
KiCad Version
```Application: PcbnewVersion: (5.99.0-2987-gd122321162), release build
Libraries: wxWidgets 3.0.5 libcurl/7.71.0 OpenSSL/1.1.1g (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.41.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info: Date: Aug 25 2020 09:02:39 wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) Boost: 1.73.0 OCE: 6.9.1 Curl: 7.71.0 ngspice: 32 Compiler: GCC 10.2.0 with C++ ABI 1014
Build settings: KICAD_SCRIPTING=ON KICAD_SCRIPTING_MODULES=ON KICAD_SCRIPTING_PYTHON3=OFF KICAD_SCRIPTING_WXPYTHON=ON KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF KICAD_SCRIPTING_ACTION_MENU=ON BUILD_GITHUB_PLUGIN=ON KICAD_USE_OCE=ON KICAD_SPICE=ON```