diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-02-10 22:16:25 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-02-10 14:33:15 -0800 |
commit | b3e4c9c8daee8df29c7d6fc943e37886217d3c98 (patch) | |
tree | 3deac4ca5344f82394bf96627dda737f87fa292c /core/metrics.cpp | |
parent | 41df39fdbe22fed32cee28a0035ee283dc49b79b (diff) | |
download | subsurface-b3e4c9c8daee8df29c7d6fc943e37886217d3c98.tar.gz |
desktop: cache photo and geo icons
The icons shown in the dive list were rendered for every single
access. Render them only once. This supposes that the
defaultIconMetrics structure does not change once the icons are
rendered!
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/metrics.cpp')
-rw-r--r-- | core/metrics.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/metrics.cpp b/core/metrics.cpp index 9351bcb0d..7316487a1 100644 --- a/core/metrics.cpp +++ b/core/metrics.cpp @@ -43,7 +43,7 @@ static int defaultIconSize(int height) return ret; } -const IconMetrics & defaultIconMetrics() +const IconMetrics &defaultIconMetrics() { if (dfltIconMetrics.sz_small == -1) { int small = defaultIconSize(defaultModelFontMetrics().height()); |