mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: don't create "uninteresting" event icons
There is code to dynamically show/hide event icons of a certain type. The same code is used to hide generally non-interesting/ redundant items. Instead, don't even create these items. Yes, this is idle premature optimization. A loop over all created event icons to hide them can be removed, because the icon is hidden anyway on construction time. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
9e831c5001
commit
8a9ca5fcda
3 changed files with 32 additions and 33 deletions
|
|
@ -23,6 +23,8 @@ public:
|
|||
void setHorizontalAxis(DiveCartesianAxis *axis);
|
||||
void setModel(DivePlotDataModel *model);
|
||||
bool shouldBeHidden();
|
||||
static bool isInteresting(const struct dive *d, const struct divecomputer *dc,
|
||||
const struct event *ev, const DivePlotDataModel &model);
|
||||
public
|
||||
slots:
|
||||
void recalculatePos(int animationSpeed);
|
||||
|
|
@ -30,7 +32,6 @@ slots:
|
|||
private:
|
||||
void setupToolTipString(struct gasmix lastgasmix);
|
||||
void setupPixmap(struct gasmix lastgasmix, const DivePixmaps &pixmaps);
|
||||
int depthAtTime(int time);
|
||||
DiveCartesianAxis *vAxis;
|
||||
DiveCartesianAxis *hAxis;
|
||||
DivePlotDataModel *dataModel;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue