! * \brief CartesianPlotPrivate::rangeChanged * This function will be called if the range shall be updated, because some other parameters (like the datarange type, datarange points) * changed. In this case the ranges must be updated if autoscale is turned on * At the end signals for all ranges are send out that they changed. */
| 3584 | * At the end signals for all ranges are send out that they changed. |
| 3585 | */ |
| 3586 | void CartesianPlotPrivate::rangeChanged() { |
| 3587 | DEBUG(Q_FUNC_INFO) |
| 3588 | for (const auto* cSystem : q->m_coordinateSystems) { |
| 3589 | const auto cs = static_cast<const CartesianCoordinateSystem*>(cSystem); |
| 3590 | int xIndex = cs->index(Dimension::X); |
| 3591 | int yIndex = cs->index(Dimension::Y); |
| 3592 | xRanges[xIndex].dirty = true; |
| 3593 | yRanges[yIndex].dirty = true; |
| 3594 | if (autoScale(Dimension::X, xIndex) && autoScale(Dimension::Y, yIndex)) |
| 3595 | q->scaleAuto(xIndex, yIndex); |
| 3596 | else if (autoScale(Dimension::X, xIndex)) |
| 3597 | q->scaleAuto(Dimension::X, xIndex, false); |
| 3598 | else if (autoScale(Dimension::Y, yIndex)) |
| 3599 | q->scaleAuto(Dimension::Y, yIndex, false); |
| 3600 | } |
| 3601 | q->WorksheetElementContainer::retransform(); |
| 3602 | } |
| 3603 | |
| 3604 | void CartesianPlotPrivate::niceExtendChanged() { |
| 3605 | DEBUG(Q_FUNC_INFO) |