diff options
Diffstat (limited to 'pokemodr/TilemapModel.cpp')
| -rw-r--r-- | pokemodr/TilemapModel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pokemodr/TilemapModel.cpp b/pokemodr/TilemapModel.cpp index 22c57aba..6fe1970c 100644 --- a/pokemodr/TilemapModel.cpp +++ b/pokemodr/TilemapModel.cpp @@ -56,7 +56,7 @@ QVariant TilemapModel::data(const QModelIndex& index, int role) const return m_pokemod->tile(idx)->sprite(); } if (role == Qt::EditRole) - m_map->at(index.row(), index.column()); + return m_map->at(index.row(), index.column()); if (role == Qt::ToolTipRole) { int idx = m_pokemod->tileIndex(m_map->at(index.row(), index.column())); @@ -77,6 +77,7 @@ bool TilemapModel::setData(const QModelIndex& index, const QVariant& value, int { if (role != Qt::EditRole) return false; +// emit(setDataChanged(index, index)); (*m_map)(index.row(), index.column()) = m_pokemod->tile(value.toInt())->id(); emit(dataChanged(index, index)); return true; |
