! \internal Prepares the internal tick vector, sub tick vector and tick label vector. This is done by calling QCPAxisTicker::generate on the currently installed ticker. If a change in the label text/count is detected, the cached axis margin is invalidated to make sure the next margin calculation recalculates the label sizes and returns an up-to-date value. */
| 9732 | sure the next margin calculation recalculates the label sizes and returns an up-to-date value. |
| 9733 | */ |
| 9734 | void QCPAxis::setupTickVectors() |
| 9735 | { |
| 9736 | if (!mParentPlot) return; |
| 9737 | if ((!mTicks && !mTickLabels && !mGrid->visible()) || mRange.size() <= 0) return; |
| 9738 | |
| 9739 | QVector<QString> oldLabels = mTickVectorLabels; |
| 9740 | mTicker->generate(mRange, mParentPlot->locale(), mNumberFormatChar, mNumberPrecision, mTickVector, mSubTicks ? &mSubTickVector : nullptr, mTickLabels ? &mTickVectorLabels : nullptr); |
| 9741 | mCachedMarginValid &= mTickVectorLabels == oldLabels; // if labels have changed, margin might have changed, too |
| 9742 | } |
| 9743 | |
| 9744 | /*! \internal |
| 9745 |