diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/SANSDiagnostics.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/SANSDiagnostics.cpp
index 22a221e..b3b9b06 100644
a
|
b
|
namespace MantidQt |
453 | 453 | // if detector id inside the range |
454 | 454 | if (detID >= rectDet->getMinimumDetectorId() && detID <= rectDet->getMaximumDetectorId()) |
455 | 455 | { |
456 | | aux = spec->getSpectrumNo(); |
| 456 | aux = spec->getSpectrumNo() -1; // to transfor spectrum number into spectrum index |
457 | 457 | if (aux > max_spec_index) |
458 | 458 | max_spec_index = aux; |
459 | 459 | if (aux < min_spec_index) |