summaryrefslogtreecommitdiff
path: root/src/gui/widgets/scrollarea.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-02 12:46:32 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-02 12:46:32 +0300
commit11caa7aeeb3a7b40823da8573576d2354b7504b5 (patch)
treefe34c20ea973e65104747b59675acf6363e7b5d2 /src/gui/widgets/scrollarea.cpp
parent0c4ed5a9594b849b436fca13c6992dee923915ed (diff)
downloadmv-11caa7aeeb3a7b40823da8573576d2354b7504b5.tar.gz
mv-11caa7aeeb3a7b40823da8573576d2354b7504b5.tar.bz2
mv-11caa7aeeb3a7b40823da8573576d2354b7504b5.tar.xz
mv-11caa7aeeb3a7b40823da8573576d2354b7504b5.zip
Add missing const and static into gui classes.
Diffstat (limited to 'src/gui/widgets/scrollarea.cpp')
-rw-r--r--src/gui/widgets/scrollarea.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index 6d7695198..a260142a1 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -96,23 +96,19 @@ ScrollArea::~ScrollArea()
delete getContent();
instances--;
- const Theme *const theme = Theme::instance();
- if (theme)
+ if (instances == 0)
{
- if (instances == 0)
+ Theme::unloadRect(background);
+ Theme::unloadRect(vMarker);
+ Theme::unloadRect(vMarkerHi);
+ Theme::unloadRect(vBackground);
+ Theme::unloadRect(hBackground);
+ for (int i = 0; i < 2; i ++)
{
- theme->unloadRect(background);
- theme->unloadRect(vMarker);
- theme->unloadRect(vMarkerHi);
- theme->unloadRect(vBackground);
- theme->unloadRect(hBackground);
- for (int i = 0; i < 2; i ++)
+ for (int f = UP; f < BUTTONS_DIR; f ++)
{
- for (int f = UP; f < BUTTONS_DIR; f ++)
- {
- if (buttons[f][i])
- buttons[f][i]->decRef();
- }
+ if (buttons[f][i])
+ buttons[f][i]->decRef();
}
}
}