pcbnew: add footprint triggers auto-pan window

Description

If using the "Add a footprint" icon on the right toolbar the added footprint is often added directly next to this button. This creates not only a "warping" of the mouse-cursor but also often provokes the start of the auto-board-window-scrolling (auto-panning).

just tested:

  • The problem also occurs if I use mainmenu-->Place-->Add Footprint to invoke the footprint-chooser. The main-window-view scrolls/pans to the top at inserting the new footprint (doubleclick in footprint-chooser)
  • The problem doesn't occur if I use the hotkey-function for "add a footprint", in this case the footprint is conveniently placed at the cursor location
  • the problem seems to gets worse if I use my Evoluent-mouse with programmable double-click-button. With using the normal LMB-double-click-button I can recreate the autopanning only with 25% chance, with the programmable-double-click-button almost 90% of the time the window scrolls to the right.

Steps to reproduce

  1. open attached project, open pcbnew with board
  2. for best recognition of the problem: enable preferences --> mouse&touchpad --> automatic pan while moving objects
  3. click Icon "add a footprint" on right toolbar (see first picture).
  4. footprint chooser opens. scroll to any library, mark any footprint
  5. move the mouse-pointer to the marked footprint, memorize this mouse-pointer-position
  6. doubleclick the marked footprint, observe:
  • footprint chooser closes,
  • mouse-pointer "warps" from the memorized position (step4) near to the "add footprint" button
  • footprint is inserted into board-view 1...2mm left of the clicked "add footprint" button
  1. if the behaviour is not clearly visible try closing pcbnew / reopening the board. This enhances the chance of seeing the described behaviour.
  2. The normal behaviour would be to insert the footprint at the position where the mouse-cursor was at the time of the double-click.

add_footprint

bugreport_add_footprint.zip

KiCad Version

Application: KiCad PCB Editor (64-bit)

Version: (6.0.0-rc1-223-gdb41769bb9), release build

Libraries:
	wxWidgets 3.1.5

Platform: Windows 10 (build 19042), 64-bit edition, 64 bit, Little endian, wxMSW

	wxWidgets: 3.1.5 (wchar_t,wx containers)
	Boost: 1.76.0
	OCC: 7.5.0
	Curl: 7.78.0-DEV
	ngspice: 35
	Compiler: Visual C++ 1929 without C++ ABI

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON