From 460e7bdf3f6c1de69f41b02a16deb85522ae3c49 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 13 Oct 2008 21:05:50 +0000 Subject: [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 --- sigmodr/TilemapModel.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sigmodr/TilemapModel.cpp') 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) -- cgit