def _onRightButtonDown(self, evt): """ Overload the right button down call back to avoid a problem with the context menu over matplotlib plots on linux. :TODO: Investigate what the root cause of the problem is. """ if sys.platform == 'linux2' or self.panel.dimension == 3: evt.Skip() else: FigureCanvasWxAgg._onRightButtonDown(self, evt) # This solves the focusing on rightclick. # Todo: better design self.panel.parent.set_plot_unfocus() self.panel.on_set_focus(None) return
def _onRightButtonDown(self, evt): """ Overload the right button down call back to avoid a problem with the context menu over matplotlib plots on linux. :TODO: Investigate what the root cause of the problem is. """ if sys.platform == 'linux2' or self.panel.dimension == 3: evt.Skip() else: FigureCanvasWxAgg._onRightButtonDown(self, evt) # This solves the focusing on rightclick. # Todo: better design self.panel.parent.set_plot_unfocus() self.panel.on_set_focus(None) return