Пример #1
0
    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
Пример #2
0
    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