summaryrefslogtreecommitdiff
path: root/src/gui/widgets/shortcutcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/shortcutcontainer.cpp')
-rw-r--r--src/gui/widgets/shortcutcontainer.cpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp
index 1ac9a9d69..e38b4c294 100644
--- a/src/gui/widgets/shortcutcontainer.cpp
+++ b/src/gui/widgets/shortcutcontainer.cpp
@@ -124,29 +124,30 @@ void ShortcutContainer::drawBackground(Graphics *g)
{
if (mBackgroundImg)
{
- if (isBatchDrawRenders(openGLMode))
- {
- if (mRedraw)
- {
- mRedraw = false;
- mVertexes->clear();
- for (unsigned i = 0; i < mMaxItems; i ++)
- {
- g->calcTileCollection(mVertexes, mBackgroundImg,
- (i % mGridWidth) * mBoxWidth,
- (i / mGridWidth) * mBoxHeight);
- }
- g->finalize(mVertexes);
- }
- g->drawTileCollection(mVertexes);
- }
- else
+ if (mRedraw)
{
+ mRedraw = false;
+ mVertexes->clear();
for (unsigned i = 0; i < mMaxItems; i ++)
{
- g->drawImage(mBackgroundImg, (i % mGridWidth) * mBoxWidth,
+ g->calcTileCollection(mVertexes, mBackgroundImg,
+ (i % mGridWidth) * mBoxWidth,
(i / mGridWidth) * mBoxHeight);
}
+ g->finalize(mVertexes);
+ }
+ g->drawTileCollection(mVertexes);
+ }
+}
+
+void ShortcutContainer::safeDrawBackground(Graphics *g)
+{
+ if (mBackgroundImg)
+ {
+ for (unsigned i = 0; i < mMaxItems; i ++)
+ {
+ g->drawImage(mBackgroundImg, (i % mGridWidth) * mBoxWidth,
+ (i / mGridWidth) * mBoxHeight);
}
}
}