assign pre-existing toolbar to new canvas

I made a toolbar in a figure originally tied to a canvas via wx backend
means. I cleared the figure, assigned a new canvas, and want to assign the
same toolbar to it. Recreating the toolbar and setting it in wx caused odd
display transition (it was slow I suppose?).

I've been able to to get this mostly to work by simply using:

self.toolbar.canvas = self.canvas
self.toolbar._idDrag=self.canvas.mpl_connect('motion_notify_event',\
   self.toolbar.mouse_move)

This works so long as a toolbar button isn't pressed originally upon putting
in a new canvas, in which case the user would have to repress the previously
pressed button to make it work.
Any ideas on what I can do?

···

--
View this message in context: http://www.nabble.com/assign-pre-existing-toolbar-to-new-canvas-tp25157107p25157107.html
Sent from the matplotlib - users mailing list archive at Nabble.com.