I am trying to write a tool that displays additional information about the pixel being viewed by the pixel inspector. So I made a custom minor mode, and tried binding it to the "pointer-1--shift--drag" event, like this:
name = 'overridetest'
global_bindings = None
override_bindings = [
('pointer-1--shift--drag', self.printMsg, 'Print pointer loc')
self.init(name, global_bindings, override_bindings)
def printMsg(self, event):
print 'Pointer loc:', event.pointer()
While my widget works, it unfortunately also causes the pixel inspector to stop behaving correctly. Basically, I can shift-click and the pixel inspector will appear, but when I shift-drag the pixel inspector no longer moves around with the mouse.
I tried following the recommendations in this section of the documentation:
But even then, it still doesn't seem like the event is being passed properly along to the inspector. Does anyone know what I might be doing wrong? I've attached this code as a test package just in case anyone needs to take a closer look.