diff options
-rw-r--r-- | utils/themeeditor/graphics/rbtoucharea.cpp | 4 | ||||
-rw-r--r-- | utils/themeeditor/graphics/rbtoucharea.h | 2 | ||||
-rw-r--r-- | utils/themeeditor/models/parsetreenode.cpp | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/utils/themeeditor/graphics/rbtoucharea.cpp b/utils/themeeditor/graphics/rbtoucharea.cpp index e41129a213..eee858e28f 100644 --- a/utils/themeeditor/graphics/rbtoucharea.cpp +++ b/utils/themeeditor/graphics/rbtoucharea.cpp @@ -28,8 +28,8 @@ #include <QGraphicsSceneMouseEvent> RBTouchArea::RBTouchArea(int width, int height, QString action, - const RBRenderInfo& info) - : QGraphicsItem(info.screen()), + const RBRenderInfo& info, QGraphicsItem* parent) + : QGraphicsItem(parent), size(QRectF(0, 0, width, height)), action(action), device(info.device()) { diff --git a/utils/themeeditor/graphics/rbtoucharea.h b/utils/themeeditor/graphics/rbtoucharea.h index ccc3edb272..91d9ef24ac 100644 --- a/utils/themeeditor/graphics/rbtoucharea.h +++ b/utils/themeeditor/graphics/rbtoucharea.h @@ -31,7 +31,7 @@ class RBTouchArea : public QGraphicsItem { public: RBTouchArea(int width, int height, QString action, - const RBRenderInfo& info); + const RBRenderInfo& info, QGraphicsItem* parent = 0); virtual ~RBTouchArea(); QRectF boundingRect() const; diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp index 03f1b21444..1c7de7cc25 100644 --- a/utils/themeeditor/models/parsetreenode.cpp +++ b/utils/themeeditor/models/parsetreenode.cpp @@ -930,7 +930,8 @@ bool ParseTreeNode::execTag(const RBRenderInfo& info, RBViewport* viewport) int width = element->params[2].data.number; int height = element->params[3].data.number; QString action(element->params[4].data.text); - RBTouchArea* temp = new RBTouchArea(width, height, action, info); + RBTouchArea* temp = new RBTouchArea(width, height, action, info, + viewport); temp->setPos(x, y); return true; } |