Skip to content

Commit

Permalink
[FEATURE] allow to pick the closest spectum (irrespective of MS level…
Browse files Browse the repository at this point in the history
…) from 2D view and show its IM-frame
  • Loading branch information
cbielow committed Apr 5, 2024
1 parent 66454e0 commit d02a915
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/openms_gui/source/VISUAL/Plot2DCanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -996,11 +996,11 @@ namespace OpenMS
context_menu->addSeparator();
}

auto it_closest_MS1 = lp->getPeakData()->getClosestSpectrumInRT(e_units.getMinRT(), 1);
if (it_closest_MS1->containsIMData())
auto it_closest_MS = lp->getPeakData()->getClosestSpectrumInRT(e_units.getMinRT());
if (it_closest_MS->containsIMData())
{
context_menu->addAction(("Switch to ion mobility view (RT: " + String(it_closest_MS1->getRT(), false) + ")").c_str(),
[&]() {emit showCurrentPeaksAsIonMobility(*it_closest_MS1); });
context_menu->addAction(("Switch to ion mobility view (MSLevel: " + String(it_closest_MS->getMSLevel()) + ";RT: " + String(it_closest_MS->getRT(), false) + ")").c_str(),
[&]() {emit showCurrentPeaksAsIonMobility(*it_closest_MS); });
}


Expand Down

0 comments on commit d02a915

Please sign in to comment.