summaryrefslogtreecommitdiff
path: root/PyMca5/PyMcaGui/pymca/ExternalImagesWindow.py
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>2015-07-17 10:45:41 +0200
committerPicca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>2015-07-17 10:45:41 +0200
commite386220cf384f7407002d8d1d0383422d14e5ee8 (patch)
tree32752aa6cc15387862e6c600f100ac0848e9133d /PyMca5/PyMcaGui/pymca/ExternalImagesWindow.py
parent6ebe655711aa39a4942316967f7e110db779c4ba (diff)
Imported Upstream version 5.1.0+dfsg
Diffstat (limited to 'PyMca5/PyMcaGui/pymca/ExternalImagesWindow.py')
-rw-r--r--PyMca5/PyMcaGui/pymca/ExternalImagesWindow.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/PyMca5/PyMcaGui/pymca/ExternalImagesWindow.py b/PyMca5/PyMcaGui/pymca/ExternalImagesWindow.py
index d35e0bb..4791ce5 100644
--- a/PyMca5/PyMcaGui/pymca/ExternalImagesWindow.py
+++ b/PyMca5/PyMcaGui/pymca/ExternalImagesWindow.py
@@ -1,5 +1,5 @@
#/*##########################################################################
-# Copyright (C) 2004-2014 V.A. Sole, European Synchrotron Radiation Facility
+# Copyright (C) 2004-2015 V.A. Sole, European Synchrotron Radiation Facility
#
# This file is part of the PyMca X-ray Fluorescence Toolkit developed at
# the ESRF by the Software group.
@@ -126,8 +126,8 @@ class ExternalImagesWindow(MaskImageWidget.MaskImageWidget):
width = qimage.width()
height = qimage.height()
- xmin, xmax = self.graphWidget.graph.getX1AxisLimits()
- ymin, ymax = self.graphWidget.graph.getY1AxisLimits()
+ xmin, xmax = self.graphWidget.graph.getGraphXLimits()
+ ymin, ymax = self.graphWidget.graph.getGraphYLimits()
xmin = int(xmin)
xmax = int(xmax)
ymin = int(ymin)
@@ -314,6 +314,11 @@ class ExternalImagesWindow(MaskImageWidget.MaskImageWidget):
self.imageList = imagelist
self.imageNames = imagenames
if imagelist is not None:
+ if imagenames is None:
+ nImages = len(self.imageList)
+ self.imageNames = [None] * nImages
+ for i in range(nImages):
+ self.imageNames[i] = "Image %02d" % i
current = self.slider.value()
self.slider.setMaximum(len(self.imageList)-1)
if current < len(self.imageList):