mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-22 01:11:32 +00:00
inverted region map y-axis
This commit is contained in:
parent
c26a6f884f
commit
4cce466dc7
1 changed files with 4 additions and 2 deletions
|
@ -27,13 +27,15 @@ CSMWorld::RegionMap::CellDescription::CellDescription (const Record<Cell>& cell)
|
||||||
|
|
||||||
CSMWorld::RegionMap::CellIndex CSMWorld::RegionMap::getIndex (const QModelIndex& index) const
|
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
|
QModelIndex CSMWorld::RegionMap::getIndex (const CellIndex& index) const
|
||||||
{
|
{
|
||||||
// I hate you, Qt API naming scheme!
|
// 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()
|
void CSMWorld::RegionMap::buildRegions()
|
||||||
|
|
Loading…
Reference in a new issue