| 1513 | } |
| 1514 | |
| 1515 | void Plot1DCanvas::activateSpectrum(Size index, bool repaint) |
| 1516 | { |
| 1517 | // clear selected peak, so we do not accidentally access an invalid index next time when moving the mouse |
| 1518 | selected_peak_.clear(); |
| 1519 | |
| 1520 | if (getCurrentLayer().hasIndex(index)) |
| 1521 | { |
| 1522 | getCurrentLayer().setCurrentIndex(index); |
| 1523 | recalculateRanges_(); // adapt overall_range_(1d)_ |
| 1524 | changeVisibleArea_(visible_area_, repaint, false); // updates y-axis based on new spectrum |
| 1525 | } |
| 1526 | } |
| 1527 | |
| 1528 | void Plot1DCanvas::setCurrentLayerPeakPenStyle(Qt::PenStyle ps) |
| 1529 | { |