PCB objects moved incorrectly if their center isn't in the view: is this normal?

Hi,

If I select and drag an object which center is visible (i.e: in the current view), the mouse cursor immediately jumps to its center and the object then moves correctly. However, if the center is outside of the view, the object will be unexpectedly moved and centered on the mouse cursor.
I thought it was due to some Magnetic Points option in the preferences, but disabling them didn’t change anything. Did I miss something ? Thanks for your hints.

My KiCad version:

Application: KiCad PCB Editor x64 on x64

Version: 8.0.6, release build

Libraries:
wxWidgets 3.2.6
FreeType 2.13.2
HarfBuzz 9.0.0
FontConfig 2.14.2
libcurl/8.8.0-DEV Schannel zlib/1.3.1

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

Build Info:
Date: Oct 14 2024 01:02:33
wxWidgets: 3.2.6 (wchar_t,wx containers)
Boost: 1.85.0
OCC: 7.8.1
Curl: 8.8.0-DEV
ngspice: 43
Compiler: Visual C++ 1939 without C++ ABI

I posted a possible drag issue 2 days ago.
If you zoom on any item such that its center be outside of the visible area, draging this item (even a very little bit) won’t work as expected. Usually, the mouse cursor centers on the item before it gets draged. Instead, as the item’s center isn’t visible, the item gets immediately moved and centered on the mouse cursor, which is a definite bug in my opinion (there’s no reason for such a move).

I’m not really sure about your workflow. You need to exactly and comprehensive describe your working steps, so we can reproduce the behaviour. (do you talk about schematic or pcb editor? How do you select something? why is the selection not in the view after you made the selection? If you drag with mouse LMB-drag, the mouse pointer must be above the srlrctrf objects. So the objects are in view? How do you initiate the dragging? How are your preference settings regarding dragging in the global preferences?)

In advance I have already taken a quick look into different kicad versions (v7+v8+v8.99) and for me the dragging behaviour is similar in all versions. So I guess the dragging behaviour is as designed.

Also, can the automatic centering before dragging be disabled ?

same as above: I don’t know to which behaviour you are referring. But as far as I know there is no checkbox to change the dragging behaviour.

remark: I rarely react on pmail-messages, so this was a only by chance that I saw your message. Please use this thread (or open a gitlab issue).

Thanks for you answer.

The problem happens under PCBNew. The drag options in Preferences are :

  • Left button: drag selected
  • others: pan

To drag an object, I click it once to select it. Once highlighted, I click and maintain the LMB pressed to drag it. If I do this under a high zoom such that the object is partially visible with its center outside of the visible area, the problem occurs.

By disabling auto-centering while draging, I meant that the mouse cursor wouldn’t be moved to the center of the selected object when starting the drag. If this isn’t possible actually, can an option be created for this purpose ?

Regarding your first issue: this explanation is better, I think I understand you now. Nevertheless I think this is the designed behaviour. Otherwise the drag-command would need to automatically pan and zoom the canvas-view to get your selection on screen so the cursor can jump to the selection centre. Sounds complicated to program and with surprise for the user: I at least don’t want a automatic change in the canvas view if I initiate a drag/move command.
So I recommend to get accomodated to the kicad behaviour. You will experience more of such things - big/complex programs are always a compromise between the different requirements/wishes of many users. Sometimes these compromise is to your liking, sometimes not.
Nevertheless you are free to open a gitlab issue for this topic - then it’s up to the kicad programmers to decide how to proceed.

regarding auto-centering the cursor on the selected object: maybe try global preferences–>common–>Editing–>warp mouse to origin of moved object → checkbox disbled.
Note that disabling this will influence the complete kicad behaviour. (I always work with checkbox set - so no experience what happens if this is disabled)

opened bugreport: pcbnew: object incorrectly moved with "warp mouse to origin of moved object" global preference enabled (#19209) · Issues · KiCad / KiCad Source Code / kicad · GitLab
Let’s see what the programmers write into this report.