mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-16 07:49:05 -04:00
Do not copy QVectors twice
This commit is contained in:
parent
c86eecb2ea
commit
0723b44a65
@ -368,10 +368,9 @@ void CSVRender::TerrainTextureMode::editTerrainTextureGrid(const WorldspaceHitRe
|
|||||||
|
|
||||||
if (mBrushShape == CSVWidget::BrushShape_Point)
|
if (mBrushShape == CSVWidget::BrushShape_Point)
|
||||||
{
|
{
|
||||||
CSMWorld::LandTexturesColumn::DataType newTerrainPointer
|
CSMWorld::LandTexturesColumn::DataType newTerrain
|
||||||
= landTable.data(landTable.getModelIndex(mCellId, textureColumn))
|
= landTable.data(landTable.getModelIndex(mCellId, textureColumn))
|
||||||
.value<CSMWorld::LandTexturesColumn::DataType>();
|
.value<CSMWorld::LandTexturesColumn::DataType>();
|
||||||
CSMWorld::LandTexturesColumn::DataType newTerrain(newTerrainPointer);
|
|
||||||
|
|
||||||
if (allowLandTextureEditing(mCellId))
|
if (allowLandTextureEditing(mCellId))
|
||||||
{
|
{
|
||||||
@ -403,10 +402,9 @@ void CSVRender::TerrainTextureMode::editTerrainTextureGrid(const WorldspaceHitRe
|
|||||||
iteratedCellId = CSMWorld::CellCoordinates::generateId(i_cell, j_cell);
|
iteratedCellId = CSMWorld::CellCoordinates::generateId(i_cell, j_cell);
|
||||||
if (allowLandTextureEditing(iteratedCellId))
|
if (allowLandTextureEditing(iteratedCellId))
|
||||||
{
|
{
|
||||||
CSMWorld::LandTexturesColumn::DataType newTerrainPointer
|
CSMWorld::LandTexturesColumn::DataType newTerrain
|
||||||
= landTable.data(landTable.getModelIndex(iteratedCellId, textureColumn))
|
= landTable.data(landTable.getModelIndex(iteratedCellId, textureColumn))
|
||||||
.value<CSMWorld::LandTexturesColumn::DataType>();
|
.value<CSMWorld::LandTexturesColumn::DataType>();
|
||||||
CSMWorld::LandTexturesColumn::DataType newTerrain(newTerrainPointer);
|
|
||||||
for (int i = 0; i < landTextureSize; i++)
|
for (int i = 0; i < landTextureSize; i++)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < landTextureSize; j++)
|
for (int j = 0; j < landTextureSize; j++)
|
||||||
@ -467,10 +465,9 @@ void CSVRender::TerrainTextureMode::editTerrainTextureGrid(const WorldspaceHitRe
|
|||||||
iteratedCellId = CSMWorld::CellCoordinates::generateId(i_cell, j_cell);
|
iteratedCellId = CSMWorld::CellCoordinates::generateId(i_cell, j_cell);
|
||||||
if (allowLandTextureEditing(iteratedCellId))
|
if (allowLandTextureEditing(iteratedCellId))
|
||||||
{
|
{
|
||||||
CSMWorld::LandTexturesColumn::DataType newTerrainPointer
|
CSMWorld::LandTexturesColumn::DataType newTerrain
|
||||||
= landTable.data(landTable.getModelIndex(iteratedCellId, textureColumn))
|
= landTable.data(landTable.getModelIndex(iteratedCellId, textureColumn))
|
||||||
.value<CSMWorld::LandTexturesColumn::DataType>();
|
.value<CSMWorld::LandTexturesColumn::DataType>();
|
||||||
CSMWorld::LandTexturesColumn::DataType newTerrain(newTerrainPointer);
|
|
||||||
for (int i = 0; i < landTextureSize; i++)
|
for (int i = 0; i < landTextureSize; i++)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < landTextureSize; j++)
|
for (int j = 0; j < landTextureSize; j++)
|
||||||
@ -516,10 +513,9 @@ void CSVRender::TerrainTextureMode::editTerrainTextureGrid(const WorldspaceHitRe
|
|||||||
|
|
||||||
if (mBrushShape == CSVWidget::BrushShape_Custom)
|
if (mBrushShape == CSVWidget::BrushShape_Custom)
|
||||||
{
|
{
|
||||||
CSMWorld::LandTexturesColumn::DataType newTerrainPointer
|
CSMWorld::LandTexturesColumn::DataType newTerrain
|
||||||
= landTable.data(landTable.getModelIndex(mCellId, textureColumn))
|
= landTable.data(landTable.getModelIndex(mCellId, textureColumn))
|
||||||
.value<CSMWorld::LandTexturesColumn::DataType>();
|
.value<CSMWorld::LandTexturesColumn::DataType>();
|
||||||
CSMWorld::LandTexturesColumn::DataType newTerrain(newTerrainPointer);
|
|
||||||
|
|
||||||
if (allowLandTextureEditing(mCellId) && !mCustomBrushShape.empty())
|
if (allowLandTextureEditing(mCellId) && !mCustomBrushShape.empty())
|
||||||
{
|
{
|
||||||
@ -541,10 +537,9 @@ void CSVRender::TerrainTextureMode::editTerrainTextureGrid(const WorldspaceHitRe
|
|||||||
= CSMWorld::CellCoordinates::generateId(cellX + cellXDifference, cellY + cellYDifference);
|
= CSMWorld::CellCoordinates::generateId(cellX + cellXDifference, cellY + cellYDifference);
|
||||||
if (allowLandTextureEditing(cellId))
|
if (allowLandTextureEditing(cellId))
|
||||||
{
|
{
|
||||||
CSMWorld::LandTexturesColumn::DataType newTerrainPointerOtherCell
|
CSMWorld::LandTexturesColumn::DataType newTerrainOtherCell
|
||||||
= landTable.data(landTable.getModelIndex(cellId, textureColumn))
|
= landTable.data(landTable.getModelIndex(cellId, textureColumn))
|
||||||
.value<CSMWorld::LandTexturesColumn::DataType>();
|
.value<CSMWorld::LandTexturesColumn::DataType>();
|
||||||
CSMWorld::LandTexturesColumn::DataType newTerrainOtherCell(newTerrainPointerOtherCell);
|
|
||||||
newTerrainOtherCell[yInOtherCell * landTextureSize + xInOtherCell] = brushInt;
|
newTerrainOtherCell[yInOtherCell * landTextureSize + xInOtherCell] = brushInt;
|
||||||
pushEditToCommand(newTerrainOtherCell, document, landTable, cellId);
|
pushEditToCommand(newTerrainOtherCell, document, landTable, cellId);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user