diff --git a/PyMca5/PyMcaGui/plotting/SilxMaskImageWidget.py b/PyMca5/PyMcaGui/plotting/SilxMaskImageWidget.py index a61a9d05e..4d6173cf2 100644 --- a/PyMca5/PyMcaGui/plotting/SilxMaskImageWidget.py +++ b/PyMca5/PyMcaGui/plotting/SilxMaskImageWidget.py @@ -65,7 +65,8 @@ import silx from silx.gui.plot import PlotWidget -from silx.gui.plot import PlotActions +from PyMca5.PyMcaGui.plotting import SilxPlotActions as PlotActions + from silx.gui.plot import PlotToolButtons from silx.gui.plot.MaskToolsWidget import MaskToolsWidget, MaskToolsDockWidget from silx.gui.plot.AlphaSlider import NamedImageAlphaSlider diff --git a/PyMca5/PyMcaGui/plotting/SilxPlotActions.py b/PyMca5/PyMcaGui/plotting/SilxPlotActions.py new file mode 100644 index 000000000..b3c765086 --- /dev/null +++ b/PyMca5/PyMcaGui/plotting/SilxPlotActions.py @@ -0,0 +1,35 @@ +#/*########################################################################## +# Copyright (C) 2023 European Synchrotron Radiation Facility +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +#############################################################################*/ +__author__ = "V.A. Sole - ESRF Data Analysis" +__contact__ = "sole@esrf.fr" +__license__ = "MIT" +__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France" + +__doc__ = """Silx 1.x and 2.x compatibility layer""" + +try: + from silx.gui.plot.PlotActions import * +except ImportError: + from silx.gui.plot.actions.control import * + from silx.gui.plot.actions.io import * + from silx.gui.plot.actions.histogram import PixelIntensitiesHistoAction