summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor')
-rw-r--r--utils/themeeditor/graphics/rbscreen.cpp3
-rw-r--r--utils/themeeditor/graphics/rbscreen.h5
-rw-r--r--utils/themeeditor/graphics/rbviewport.cpp3
3 files changed, 10 insertions, 1 deletions
diff --git a/utils/themeeditor/graphics/rbscreen.cpp b/utils/themeeditor/graphics/rbscreen.cpp
index b93d3c88ad..f82c60ce6c 100644
--- a/utils/themeeditor/graphics/rbscreen.cpp
+++ b/utils/themeeditor/graphics/rbscreen.cpp
@@ -133,7 +133,10 @@ void RBScreen::loadViewport(QString name, RBViewport *view)
void RBScreen::showViewport(QString name)
{
if(namedViewports.value(name, 0) == 0)
+ {
+ displayedViewports.append(name);
return;
+ }
QList<RBViewport*>* list = namedViewports.value(name, 0);
for(int i = 0; i < list->count(); i++)
diff --git a/utils/themeeditor/graphics/rbscreen.h b/utils/themeeditor/graphics/rbscreen.h
index 25f7c07bd9..7b8b83060a 100644
--- a/utils/themeeditor/graphics/rbscreen.h
+++ b/utils/themeeditor/graphics/rbscreen.h
@@ -49,6 +49,10 @@ public:
void loadViewport(QString name, RBViewport* view);
void showViewport(QString name);
+ bool viewPortDisplayed(QString name)
+ {
+ return displayedViewports.contains(name);
+ }
void loadImage(QString name, RBImage* image)
{
@@ -84,6 +88,7 @@ private:
QMap<QString, RBImage*> images;
QMap<QString, QString>* settings;
QMap<int, RBFont*> fonts;
+ QList<QString> displayedViewports;
};
diff --git a/utils/themeeditor/graphics/rbviewport.cpp b/utils/themeeditor/graphics/rbviewport.cpp
index 8fa05a2fc7..80ab5dce0b 100644
--- a/utils/themeeditor/graphics/rbviewport.cpp
+++ b/utils/themeeditor/graphics/rbviewport.cpp
@@ -69,7 +69,8 @@ RBViewport::RBViewport(skin_element* node, const RBRenderInfo& info)
/* A preloaded viewport definition */
ident = node->params[0].data.text;
customUI = false;
- hide();
+ if(!screen->viewPortDisplayed(ident))
+ hide();
info.screen()->loadViewport(ident, this);
param = 1;
break;