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

Method finishAdding_

src/openms_gui/source/VISUAL/Plot3DCanvas.cpp:82–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 }
81
82 bool Plot3DCanvas::finishAdding_()
83 {
84 if (layers_.getCurrentLayer().type != LayerDataBase::DT_PEAK)
85 {
86 popIncompleteLayer_("This widget supports peak data only. Aborting!");
87 return false;
88 }
89
90 // Abort if no data points are contained
91 auto& layer = dynamic_cast<LayerDataPeak&>(getCurrentLayer());
92
93 if (layer.getPeakData()->empty())
94 {
95 popIncompleteLayer_("Cannot add a dataset that contains no survey scans. Aborting!");
96 return false;
97 }
98
99 recalculateRanges_();
100 resetZoom(false);
101
102 //Warn if negative intensities are contained
103 if (getCurrentMinIntensity() < 0.0)
104 {
105 QMessageBox::warning(this, "Warning", "This dataset contains negative intensities. Use it at your own risk!");
106 }
107
108 emit layerActivated(this);
109 openglwidget()->recalculateDotGradient_(getCurrentLayer());
110 update_buffer_ = true;
111 update_(OPENMS_PRETTY_FUNCTION);
112
113 return true;
114 }
115
116 void Plot3DCanvas::activateLayer(Size index)
117 {

Callers

nothing calls this directly

Calls 7

recalculateRanges_Function · 0.85
resetZoomFunction · 0.85
getCurrentMinIntensityFunction · 0.85
getCurrentLayerMethod · 0.80
getPeakDataMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected