Scroll to zoom in/out

There is something weird in this scroll-to-zoom operation.

Have you guys tried and felt the same?

Sometimes the focus jumps to another place all of a sudden.
And then it becomes hard to work on the layout with this behavior.

Application: KiCad Schematic Editor

Version: 6.0.6-3a73a75311~116~ubuntu22.04.1, release build

Libraries:
	wxWidgets 3.0.5
	libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.11

Platform: Linux 5.15.0-39-generic x86_64, 64 bit, Little endian, wxGTK, ubuntu-wayland, wayland

Build Info:
	Date: Jun 20 2022 15:50:05
	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.5.2
	Curl: 7.83.1
	ngspice: 36
	Compiler: GCC 11.2.0 with C++ ABI 1016

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

Preferences → Mouse and Touchpad → Center and Warp Cursor on zoom is probably what you’re talking about

(many people find it unusual, but it’s really helpful if you get used to it)

is the current way a new behavior?

I’ve had the mouse cursor suddenly change position too. On average maybe one to 3 times a month my mouse cursor is suddenly in a completely different location on the screen, but it also happens in other programs. I’m guessing it’s some kind of driver bug, or while passing messages in the OS itself. It’s a bit annoying, but it is rare enough to not be a real issue.

Or do you mean something completely different.
You could start by giving a better expanation of what actually happens.

This is enabled for me. I think it is the right and also the old behavior, actually.

I expect it to center the selection while keeping the cursor where it is. But then sometimes something looks off. It happens pretty often, let’s say 1 of 5 times I scroll. Maybe this bad feeling is increased by the distance of the mouse off the center of the screen.

I never had this feeling before, just in this 6.0.5 version. But I was not using Kicad for a while, let’s say since version 6.0.2

My cursor remains where it is while the focus is moved to the center. Maybe the cursor has to move to the center of the screen too.

For instance, when I zoom in on top of a component in the corner. The component moves to the center of the screen which is good. But my cursor remains at the corner where it was… then I have to move the mouse back to the center…

Should the cursor remain where it was or be teleported to the center with the focus? what is the expected behavior in the previous versions?

I also have the Center and warp cursor on zoom on, but for me it works reliably. The cursor is always placed in the center of the screen, and the schematic pans so the cursor location relative to the cursor position stays the same.

And as I said, it works reliably for me, and always the same. If the behaviour changes for you 1 out of 5 times (on average?) then it sounds like some kind of bug.

Is this only in the schematic (at least, that is where you posted the version info from) or also in other sub programs from KiCad?

I would expect your cursor to move to the center of the display, so if it stays in the upper left then I think that would be a bug (either in KiCad or your window manager or…)

You’re right that “center and warp cursor on zoom” is not a new KiCad feature, it’s been around for a while. I was guessing based on limited information :slight_smile:

It happens on both tools, but in the Layout, it annoys me more since it requires more precision or because I use this thing more, there.

Ah, then it looks like a bug, let me check if I can record this behavior somehow.

Which OS do you guys use?

I’m on Linux Mint. Don’t know which version, one of the latest.

Also, this is a bit wrong:

More accurate: The cursor is placed in the center of the drawing area of the KiCad window Not in the center of the monitor, (Unless KiCad is maximized of course, then both those locations are too close for me to see the difference).

Actually there are 2 things. The mouse pointer, and the + sign that is always under the mouse pointer. I was calling the mouse pointer, cursor. Maybe you are calling the cursor the + sign.

So, when I zoom in, the + sign moves to the center of the screen, while the mouse pointer remains in the current spot.

Sure, the center of the screen I meant the center of the drawing area.

Ah for instance.

What I used to do is to zoom in a place, then move a bit to the side (since the mouse should be in the center of the drawing area) to correct the view a bit, or to move it a bit to the side.

Now, since for me, the mouse remains in the same place, to reposition the view regarding to the initial zoom that is now in the center of the drawing area, I have to move the mouse towards the center, since the mouse is not in the center and this movement is against the movement I want to do.

For me the mouse cursor (arrow) moves in pixels while the KiCad cursor (small cross) is always on the closest grid point, an after rotating the scrollwheel they are both in the center of the drawing canvas.

image

Alright, this is a bug then. I am doing these checks in the PCBNew, but I have to check if this happens on EEschema too.

What is your Kicad version?

Update: It happens on EEschema too.

Now, since yours is working, this bug may not be Kicad’s fault =/

Application: KiCad

Version: 6.0.6-3a73a75311~116~ubuntu20.04.1, release build

Libraries:
	wxWidgets 3.0.4
	libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3

Platform: Linux 5.15.0-33-generic x86_64, 64 bit, Little endian, wxGTK, xfce, x11

Build Info:
	Date: Jun 20 2022 07:42:55
	wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.71.0
	OCC: 7.5.2
	Curl: 7.83.1
	ngspice: 36
	Compiler: GCC 9.4.0 with C++ ABI 1013

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

Oops,
now it is:

Application: KiCad

Version: 6.0.6-3a73a75311~116~ubuntu20.04.1, release build

Libraries:
	wxWidgets 3.0.4
	libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3

Platform: Linux 5.15.0-33-generic x86_64, 64 bit, Little endian, wxGTK, xfce, x11

Build Info:
	Date: Jun 20 2022 15:49:56
	wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.71.0
	OCC: 7.5.2
	Curl: 7.83.1
	ngspice: 36
	Compiler: GCC 9.4.0 with C++ ABI 1013

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

That’s weird, Just did a

sudo apt update && upgrade

and noticed something KiCad like.
Version number staid the same:

Old: Version: 6.0.6-3a73a75311~116~ubuntu20.04.1, release build
New: Version: 6.0.6-3a73a75311~116~ubuntu20.04.1, release build

but the date changed a bit:

Old:. Date: Jun 20 2022 07:42:55
New: Date: Jun 20 2022 15:49:56

Your version is still 9 seconds newer though…

Just for reference I’m on the latest windows version and I get the same behaviour as paulvdh.

Move the mouse cursor (with crosshair) to the corner of the drawing canvas, zoom with mouse scroll wheel and the mouse cursor and crosshair both jump to the middle of the canvas as expected. I have tried numerous times in both pcb and schematic editor.

Was there a thing a while back about the mouse cursor / crosshair alignment on hi res screens or am just making stuff up now?? :rofl:

@636Steve Is this what you mean:

@leoheck It’s got a screen recording of cursor behavior… Is this how your system behaves?

No, my mouse cursor and crosshair stay locked together, which I believe is the correct operation.

Application: KiCad PCB Editor (64-bit)

Version: (6.0.6), release build

Libraries:
wxWidgets 3.1.6
libcurl/7.82.0-DEV Schannel zlib/1.2.12

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

Build Info:
Date: Jun 18 2022 23:26:20
wxWidgets: 3.1.6 (wchar_t,wx containers)
Boost: 1.79.0
OCC: 7.6.0
Curl: 7.82.0-DEV
ngspice: 37
Compiler: Visual C++ 1929 without C++ ABI

Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON