Skip to content

Commit

Permalink
fix RT range update when RT range is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
cbielow committed Nov 22, 2023
1 parent 59ee60e commit d54d28a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/openms_gui/include/OpenMS/VISUAL/LayerData1DChrom.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ namespace OpenMS

RangeAllType getRangeForArea(const RangeAllType partial_range) const override
{
if (partial_range.RangeRT::isEmpty())
{
auto chrom = getCurrentChrom();
return RangeAllType().assign(chrom.getRange());
}
const auto& chrom = getCurrentChrom();
auto chrom_filtered = MSExperiment::ChromatogramType();
chrom_filtered.insert(chrom_filtered.begin(), chrom.RTBegin(partial_range.getMinRT()), chrom.RTEnd(partial_range.getMaxRT()));
Expand Down

0 comments on commit d54d28a

Please sign in to comment.