! * returns the first selected XYCurve in the plot */
| 1943 | * returns the first selected XYCurve in the plot |
| 1944 | */ |
| 1945 | const XYCurve* CartesianPlot::currentCurve() const { |
| 1946 | for (const auto* curve : children<const XYCurve>()) { |
| 1947 | if (curve->graphicsItem()->isSelected()) |
| 1948 | return curve; |
| 1949 | } |
| 1950 | |
| 1951 | return nullptr; |
| 1952 | } |
| 1953 | |
| 1954 | void CartesianPlot::addDataReductionCurve() { |
| 1955 | auto* curve = new XYDataReductionCurve(i18n("Data Reduction")); |