mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 03:39:55 +00:00
inverted region map y-axis
This commit is contained in:
parent
c26a6f884f
commit
4cce466dc7
@ -27,13 +27,15 @@ CSMWorld::RegionMap::CellDescription::CellDescription (const Record<Cell>& cell)
|
||||
|
||||
CSMWorld::RegionMap::CellIndex CSMWorld::RegionMap::getIndex (const QModelIndex& index) const
|
||||
{
|
||||
return CellIndex (index.column()+mMin.first, index.row()+mMin.second);
|
||||
return CellIndex (index.column()+mMin.first,
|
||||
(mMax.second-mMin.second - index.row()-1)+mMin.second);
|
||||
}
|
||||
|
||||
QModelIndex CSMWorld::RegionMap::getIndex (const CellIndex& index) const
|
||||
{
|
||||
// I hate you, Qt API naming scheme!
|
||||
return QAbstractTableModel::index (index.second-mMin.second, index.first-mMin.first);
|
||||
return QAbstractTableModel::index (mMax.second-mMin.second - (index.second-mMin.second)-1,
|
||||
index.first-mMin.first);
|
||||
}
|
||||
|
||||
void CSMWorld::RegionMap::buildRegions()
|
||||
|
Loading…
x
Reference in New Issue
Block a user