mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: special case time axis
Rounding the axes dimensions to "nice" number may have been a good idea, but for the time-axis it feels weird. Therefore revert the time axis to the previous behavior: range is set according to the data. To differentiate between time an other axes, use the position: the time axis is the only axis at the bottom. Yes, that's ugly but pragmatic. Since we have that flag also use it for the special casing of the text-display. Spares us one virtual function dispatch. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
3e11c13100
commit
a7a7bd182e
2 changed files with 30 additions and 21 deletions
|
@ -58,7 +58,7 @@ protected:
|
|||
QPen gridPen;
|
||||
color_index_t gridColor;
|
||||
ProfileScene &scene;
|
||||
virtual QString textForValue(double value) const;
|
||||
QString textForValue(double value) const;
|
||||
virtual QColor colorForValue(double value) const;
|
||||
Orientation orientation;
|
||||
QList<DiveTextItem *> labels;
|
||||
|
@ -96,7 +96,6 @@ class TimeAxis : public DiveCartesianAxis {
|
|||
public:
|
||||
using DiveCartesianAxis::DiveCartesianAxis;
|
||||
private:
|
||||
QString textForValue(double value) const override;
|
||||
QColor colorForValue(double value) const override;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue