mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: remove "changed" flag of DiveCartesianAxis
This prevented the axes from being redrawn on resize. It shouldn't be necessary anymore. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
b673355245
commit
d3a2c40f52
2 changed files with 0 additions and 9 deletions
|
@ -13,7 +13,6 @@ static const double labelSpaceVertical = 2.0; // space between label and ticks
|
||||||
|
|
||||||
void DiveCartesianAxis::setBounds(double minimum, double maximum)
|
void DiveCartesianAxis::setBounds(double minimum, double maximum)
|
||||||
{
|
{
|
||||||
changed = !IS_FP_SAME(max, maximum) || !IS_FP_SAME(min, minimum);
|
|
||||||
dataMin = min = minimum;
|
dataMin = min = minimum;
|
||||||
dataMax = max = maximum;
|
dataMax = max = maximum;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +31,6 @@ DiveCartesianAxis::DiveCartesianAxis(Position position, bool inverted, int integ
|
||||||
textVisibility(textVisible),
|
textVisibility(textVisible),
|
||||||
lineVisibility(linesVisible),
|
lineVisibility(linesVisible),
|
||||||
labelScale(labelScale),
|
labelScale(labelScale),
|
||||||
changed(true),
|
|
||||||
dpr(dpr),
|
dpr(dpr),
|
||||||
transform({1.0, 0.0})
|
transform({1.0, 0.0})
|
||||||
{
|
{
|
||||||
|
@ -77,7 +75,6 @@ void DiveCartesianAxis::setTransform(double a, double b)
|
||||||
{
|
{
|
||||||
transform.a = a;
|
transform.a = a;
|
||||||
transform.b = b;
|
transform.b = b;
|
||||||
changed = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
@ -135,9 +132,6 @@ static double sensibleInterval(double inc, int decimals)
|
||||||
|
|
||||||
void DiveCartesianAxis::updateTicks(int animSpeed)
|
void DiveCartesianAxis::updateTicks(int animSpeed)
|
||||||
{
|
{
|
||||||
if (!changed && !printMode)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (dataMax - dataMin < 1e-5)
|
if (dataMax - dataMin < 1e-5)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -206,7 +200,6 @@ void DiveCartesianAxis::updateTicks(int animSpeed)
|
||||||
updateLabels(numTicks, firstPosScreen, firstValue, stepScreen, stepValue, animSpeed);
|
updateLabels(numTicks, firstPosScreen, firstValue, stepScreen, stepValue, animSpeed);
|
||||||
if (lineVisibility)
|
if (lineVisibility)
|
||||||
updateLines(numTicks, firstPosScreen, stepScreen, animSpeed);
|
updateLines(numTicks, firstPosScreen, stepScreen, animSpeed);
|
||||||
changed = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveCartesianAxis::updateLabels(int numTicks, double firstPosScreen, double firstValue, double stepScreen, double stepValue, int animSpeed)
|
void DiveCartesianAxis::updateLabels(int numTicks, double firstPosScreen, double firstValue, double stepScreen, double stepValue, int animSpeed)
|
||||||
|
@ -316,7 +309,6 @@ void DiveCartesianAxis::setPosition(const QRectF &rectIn)
|
||||||
setLine(QLineF(rect.bottomLeft(), rect.bottomRight()));
|
setLine(QLineF(rect.bottomLeft(), rect.bottomRight()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
changed = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double DiveCartesianAxis::Transform::to(double x) const
|
double DiveCartesianAxis::Transform::to(double x) const
|
||||||
|
|
|
@ -64,7 +64,6 @@ private:
|
||||||
bool textVisibility;
|
bool textVisibility;
|
||||||
bool lineVisibility;
|
bool lineVisibility;
|
||||||
double labelScale;
|
double labelScale;
|
||||||
bool changed;
|
|
||||||
double dpr;
|
double dpr;
|
||||||
double labelWidth, labelHeight; // maximum expected sizes of label width and height
|
double labelWidth, labelHeight; // maximum expected sizes of label width and height
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue