MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / activateSpectrum

Method activateSpectrum

src/openms_gui/source/VISUAL/Plot1DCanvas.cpp:1515–1526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 6

addTransitionAsLayerFunction · 0.80
showSpectrumAsNew1DMethod · 0.80
activate1DSpectrumMethod · 0.80
showSpectrumAsNew1DMethod · 0.80
activate1DSpectrumMethod · 0.80
addDataMethod · 0.80

Calls 3

recalculateRanges_Function · 0.85
setCurrentIndexMethod · 0.80
clearMethod · 0.45

Tested by 2

showSpectrumAsNew1DMethod · 0.64
activate1DSpectrumMethod · 0.64