Commit 2337c8fb authored by payno's avatar payno
Browse files

[gui] ComWidget: manage problem if map not created when requested

parent ccff46e8
......@@ -32,6 +32,9 @@ from silx.gui import qt
from silx.gui.plot import Plot2D
from collections import OrderedDict
from import COM as COMOperation
import logging
_logger = logging.getLogger(__file__)
class ComWidget(qt.QWidget):
......@@ -64,8 +67,13 @@ class ComWidget(qt.QWidget):
if dim >= 0:
# TODO: maps[dim] should be also a list with key values: 'value',
# 'mean', 'gradients' ...
_map = self._operation.maps[dim][_iMap]
if len(self._operation.maps[dim]) <= _iMap:
_logger.error('map of index %s has not been created' % _iMap)
_map = self._operation.maps[dim][_iMap]
class _ComControlWidget(qt.QWidget):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment