Skip to content

Tool click method does not work with button=2 #548

Description

@damskii9992

As the title mentions, this method currently does not seem to do anything when button=2 is used to simulate middle-clicks. Code-snippet to test:

import scipp as sc
import plopp as pp
data_array = sc.DataArray(data=sc.ones(dims=['y', 'x', 't'], shape=[6,6,10]))

def test(rect):
    print(f"deleting rectangle with ID {rect.id}")

figs = pp.inspector(data_array, mode='rectangle', orientation='vertical')
figs[0].toolbar['inspect']._tool.on_change(test)
figs[0].toolbar['inspect']._tool.start()
figs[0].toolbar['inspect']._tool.click(x=1, y=1, button=1)
figs[0].toolbar['inspect']._tool.click(x=5, y=5, button=1)
figs[0].toolbar['inspect']._tool.click(x=3, y=-3, button=2)
figs[0].toolbar['inspect']._tool.stop()
figs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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