mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-02 16:20:23 +00:00
pass by const ref and other fixes
This commit is contained in:
parent
20ab7df19f
commit
46ee639892
@ -56,9 +56,11 @@ void CSVRender::TerrainSelection::onlySelect(const std::vector<std::pair<int, in
|
|||||||
void CSVRender::TerrainSelection::addSelect(const std::pair<int, int> localPos)
|
void CSVRender::TerrainSelection::addSelect(const std::pair<int, int> localPos)
|
||||||
{
|
{
|
||||||
if (std::find(mSelection.begin(), mSelection.end(), localPos) == mSelection.end())
|
if (std::find(mSelection.begin(), mSelection.end(), localPos) == mSelection.end())
|
||||||
|
{
|
||||||
mSelection.emplace_back(localPos);
|
mSelection.emplace_back(localPos);
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CSVRender::TerrainSelection::toggleSelect(const std::vector<std::pair<int, int>> localPositions, bool toggleInProgress)
|
void CSVRender::TerrainSelection::toggleSelect(const std::vector<std::pair<int, int>> localPositions, bool toggleInProgress)
|
||||||
{
|
{
|
||||||
@ -115,7 +117,7 @@ void CSVRender::TerrainSelection::activate()
|
|||||||
|
|
||||||
void CSVRender::TerrainSelection::deactivate()
|
void CSVRender::TerrainSelection::deactivate()
|
||||||
{
|
{
|
||||||
if (mParentNode->containsNode(mSelectionNode)) mParentNode->removeChild(mSelectionNode);
|
mParentNode->removeChild(mSelectionNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVRender::TerrainSelection::update()
|
void CSVRender::TerrainSelection::update()
|
||||||
|
@ -493,7 +493,7 @@ void CSVRender::TerrainTextureMode::editTerrainTextureGrid(const WorldspaceHitRe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVRender::TerrainTextureMode::selectTerrainTextures(std::pair<int, int> texCoords, unsigned char selectMode, bool dragOperation)
|
void CSVRender::TerrainTextureMode::selectTerrainTextures(const std::pair<int, int>& texCoords, unsigned char selectMode, bool dragOperation)
|
||||||
{
|
{
|
||||||
int r = mBrushSize / 2;
|
int r = mBrushSize / 2;
|
||||||
std::vector<std::pair<int, int>> selections;
|
std::vector<std::pair<int, int>> selections;
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <osg/Group>
|
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
|
|
||||||
@ -23,6 +21,11 @@
|
|||||||
|
|
||||||
#include "terrainselection.hpp"
|
#include "terrainselection.hpp"
|
||||||
|
|
||||||
|
namespace osg
|
||||||
|
{
|
||||||
|
class Group;
|
||||||
|
}
|
||||||
|
|
||||||
namespace CSVWidget
|
namespace CSVWidget
|
||||||
{
|
{
|
||||||
class SceneToolTextureBrush;
|
class SceneToolTextureBrush;
|
||||||
@ -82,7 +85,7 @@ namespace CSVRender
|
|||||||
void editTerrainTextureGrid (const WorldspaceHitResult& hit);
|
void editTerrainTextureGrid (const WorldspaceHitResult& hit);
|
||||||
|
|
||||||
/// \brief Handle brush mechanics for texture selection
|
/// \brief Handle brush mechanics for texture selection
|
||||||
void selectTerrainTextures (std::pair<int, int>, unsigned char, bool);
|
void selectTerrainTextures (const std::pair<int, int>& texCoords, unsigned char selectMode, bool dragOperation);
|
||||||
|
|
||||||
/// \brief Push texture edits to command macro
|
/// \brief Push texture edits to command macro
|
||||||
void pushEditToCommand (CSMWorld::LandTexturesColumn::DataType& newLandGrid, CSMDoc::Document& document,
|
void pushEditToCommand (CSMWorld::LandTexturesColumn::DataType& newLandGrid, CSMDoc::Document& document,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user