summaryrefslogtreecommitdiffstats
path: root/pokemodr/TilemapModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemodr/TilemapModel.cpp')
-rw-r--r--pokemodr/TilemapModel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/pokemodr/TilemapModel.cpp b/pokemodr/TilemapModel.cpp
index 683420cd..1e4e8ec5 100644
--- a/pokemodr/TilemapModel.cpp
+++ b/pokemodr/TilemapModel.cpp
@@ -54,7 +54,7 @@ QVariant TilemapModel::data(const QModelIndex& index, int role) const
if (role == Qt::DisplayRole)
{
int idx = pokemod->getTileIndex(map->at(index.row(), index.column()));
- if (idx != -1)
+ if (idx != INT_MAX)
return ImageCache::open(pokemod->getTile(idx)->getPic());
}
if (role == Qt::EditRole)
@@ -62,7 +62,7 @@ QVariant TilemapModel::data(const QModelIndex& index, int role) const
if (role == Qt::ToolTipRole)
{
int idx = pokemod->getTileIndex(map->at(index.row(), index.column()));
- if (idx != -1)
+ if (idx != INT_MAX)
return pokemod->getTile(idx)->getName();
}
return QVariant();