Skip to content

additional mouse event handlers are not invoked #216

Open
@jf---

Description

@jf---

when adding a mouse callback, to viewer.eventsmanager.mouse_events no event would be emitted to the additional callback that handles the signal emitted.

in events.py

    def delegate_mousepress(self, event: QMouseEvent):
        self.viewer.mouse.last_pos = event.pos()
        for mouseevent in self.mouse_events:
            if mouseevent == event:
                print("mousevent: ", mouseevent.title)
                mouseevent.triggered.emit(event)
                mouseevent.is_active = True
                #break

the break blocks emitting to multiple handlers.
I don't think there's any reason to have it, since events are already filtered (mouseevent==event) which is a nice mechanism.

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