Fix highlight not cleared by Pcbnew.
Fix highlight not cleared by Cvpcb (missing code).
Add comments. Remove a few now useless printf used for debug
When clicking on a empty area, clear any highligthed symbols
Fixes: lp:1809977
https://bugs.launchpad.net/kicad/+bug/1809977
This makes using Scrollbars more easy to use, especially for "small" page sizes like A or B.
Note also the working/drawing area size is bigger than the page size (3 times)
This parameter defines the working area (full page) size.
The fix is not perfect, because it does not take in account the page size.
However it is similar to the "old" initialization, before Eeschema GAL.
In Eeschema, a reasonable boundary size is used.
1) when duplicating don’t keep original hidden until end of drag
2) reset selectionArea when showing it so it doesn’t flash in its previous location
3) center a pasted block on the cursor
4) don’t draw the source selectionArea when pasting a block
5) implement selection-style highlighting for contents of blocks
6) add pasted items to view so they don’t disappear when the block is placed
Fixes: lp:1747197
* https://bugs.launchpad.net/kicad/+bug/1747197
Eeschema (where only the parent component is in the view) uses
draw order.
LibEdit (where the individual items are in the view) uses the
viewPriority setting.