mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-14 16:06:44 +00:00
Do not copy QVectors twice
This commit is contained in:
parent
c86eecb2ea
commit
0723b44a65
1 changed files with 5 additions and 10 deletions
|
@ -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…
Reference in a new issue