summaryrefslogtreecommitdiffstats
path: root/sigmodr/TilemapModel.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-10-13 21:05:50 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-10-13 21:05:50 +0000
commit460e7bdf3f6c1de69f41b02a16deb85522ae3c49 (patch)
tree3b80ad00d5f021f63d3f890af2e017af314d2106 /sigmodr/TilemapModel.cpp
parentb427a8cdf13aabe59af60acf0a4264d84ae3ff7a (diff)
downloadsigen-460e7bdf3f6c1de69f41b02a16deb85522ae3c49.tar.gz
sigen-460e7bdf3f6c1de69f41b02a16deb85522ae3c49.tar.xz
sigen-460e7bdf3f6c1de69f41b02a16deb85522ae3c49.zip
[FIX] Sprite no longer stores a QImage, but a QByteArray
[FIX] Preparing for move to a collaged map instead of a tiled map git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@278 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'sigmodr/TilemapModel.cpp')
-rw-r--r--sigmodr/TilemapModel.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/sigmodr/TilemapModel.cpp b/sigmodr/TilemapModel.cpp
index 44940619..62424007 100644
--- a/sigmodr/TilemapModel.cpp
+++ b/sigmodr/TilemapModel.cpp
@@ -44,9 +44,13 @@ QVariant Sigmodr::TilemapModel::data(const QModelIndex& index, int role) const
{
const Sigmod::Tile* tile = m_sigmod->tile(tileIndex);
if (m_sigmod->spriteIndex(tile->sprite()) == INT_MAX)
- return QPixmap(64, 64);
+ return QPixmap();
else
- return QPixmap::fromImage(m_sigmod->spriteById(tile->sprite())->sprite());
+ {
+ QPixmap icon;
+ icon.loadFromData(m_sigmod->spriteById(tile->sprite())->sprite());
+ return icon;
+ }
}
}
else if (role == Qt::EditRole)