summaryrefslogtreecommitdiff
path: root/utils/themeeditor/graphics/rbimage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/graphics/rbimage.cpp')
-rw-r--r--utils/themeeditor/graphics/rbimage.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/themeeditor/graphics/rbimage.cpp b/utils/themeeditor/graphics/rbimage.cpp
index f15d1ed..ce92d2f 100644
--- a/utils/themeeditor/graphics/rbimage.cpp
+++ b/utils/themeeditor/graphics/rbimage.cpp
@@ -49,7 +49,21 @@ RBImage::RBImage(QString file, int tiles, int x, int y, QGraphicsItem* parent)
}
else
+ {
+ size = QRectF(0, 0, 0, 0);
+ image = 0;
+ }
+}
+
+RBImage::RBImage(const RBImage &other, QGraphicsItem* parent)
+ : QGraphicsItem(parent), tiles(other.tiles), currentTile(other.currentTile)
+{
+ if(other.image)
+ image = new QPixmap(*(other.image));
+ else
image = 0;
+ size = other.size;
+ setPos(other.x(), other.y());
}
RBImage::~RBImage()