Skip to content

cannot mouse zoom-in when aspect ratio locked #3300

@pijyoi

Description

@pijyoi

Short description

When aspect ratio is set to locked, using mouse move with right-button pressed no longer zooms properly.
The PlotItem can only be zoomed-out but can no longer be zoomed-in.

Code to reproduce

import pyqtgraph as pg
import numpy as np

Z = np.linspace(0, 1, 12).reshape((3, 4))

pg.mkQApp()
win = pg.PlotWidget()
win.setAspectLocked(True)
pcmi = pg.PColorMeshItem(Z)
win.addItem(pcmi)
win.show()
pg.exec()

Additional context

Bisecting points to 55d90aa (2024/07/16) as the culprit (PR #3100).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions