mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-07 13:20:25 +00:00
More readable code
This commit is contained in:
parent
780055899d
commit
6dc3d8b44b
@ -496,12 +496,9 @@ bool CSVRender::TerrainTextureMode::isInCellSelection(int globalSelectionX, int
|
|||||||
{
|
{
|
||||||
if (CSVRender::PagedWorldspaceWidget *paged = dynamic_cast<CSVRender::PagedWorldspaceWidget *> (&getWorldspaceWidget()))
|
if (CSVRender::PagedWorldspaceWidget *paged = dynamic_cast<CSVRender::PagedWorldspaceWidget *> (&getWorldspaceWidget()))
|
||||||
{
|
{
|
||||||
CSMWorld::CellSelection selection = paged->getCellSelection();
|
std::pair<int, int> textureCoords = std::make_pair(globalSelectionX, globalSelectionY);
|
||||||
if (selection.has (CSMWorld::CellCoordinates::fromId(
|
std::string cellId = CSMWorld::CellCoordinates::textureGlobalToCellId(textureCoords);
|
||||||
CSMWorld::CellCoordinates::textureGlobalToCellId(std::make_pair(globalSelectionX, globalSelectionY))).first))
|
return paged->getCellSelection().has(CSMWorld::CellCoordinates::fromId(cellId).first);
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user