mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-09 21:44:54 +00:00
Fix missed worldspacehits, add linebreak to tooltip
This commit is contained in:
parent
21e8d08e69
commit
8ae46519cf
@ -90,7 +90,7 @@ void CSVRender::TerrainTextureMode::primaryEditPressed(const WorldspaceHitResult
|
|||||||
CSMWorld::IdCollection<CSMWorld::LandTexture>& landtexturesCollection = document.getData().getLandTextures();
|
CSMWorld::IdCollection<CSMWorld::LandTexture>& landtexturesCollection = document.getData().getLandTextures();
|
||||||
int index = landtexturesCollection.searchId(mBrushTexture);
|
int index = landtexturesCollection.searchId(mBrushTexture);
|
||||||
|
|
||||||
if (index != -1 && !landtexturesCollection.getRecord(index).isDeleted())
|
if (index != -1 && !landtexturesCollection.getRecord(index).isDeleted() && hit.hit == true)
|
||||||
{
|
{
|
||||||
undoStack.beginMacro ("Edit texture records");
|
undoStack.beginMacro ("Edit texture records");
|
||||||
if(allowLandTextureEditing(mCellId)==true)
|
if(allowLandTextureEditing(mCellId)==true)
|
||||||
@ -130,7 +130,7 @@ bool CSVRender::TerrainTextureMode::primaryEditStartDrag (const QPoint& pos)
|
|||||||
if (index != -1 && !landtexturesCollection.getRecord(index).isDeleted())
|
if (index != -1 && !landtexturesCollection.getRecord(index).isDeleted())
|
||||||
{
|
{
|
||||||
undoStack.beginMacro ("Edit texture records");
|
undoStack.beginMacro ("Edit texture records");
|
||||||
if(allowLandTextureEditing(mCellId)==true)
|
if(allowLandTextureEditing(mCellId)==true && hit.hit == true)
|
||||||
{
|
{
|
||||||
undoStack.push (new CSMWorld::TouchLandCommand(landTable, ltexTable, mCellId));
|
undoStack.push (new CSMWorld::TouchLandCommand(landTable, ltexTable, mCellId));
|
||||||
editTerrainTextureGrid(hit);
|
editTerrainTextureGrid(hit);
|
||||||
@ -163,7 +163,7 @@ void CSVRender::TerrainTextureMode::drag (const QPoint& pos, int diffX, int diff
|
|||||||
CSMWorld::IdCollection<CSMWorld::LandTexture>& landtexturesCollection = document.getData().getLandTextures();
|
CSMWorld::IdCollection<CSMWorld::LandTexture>& landtexturesCollection = document.getData().getLandTextures();
|
||||||
int index = landtexturesCollection.searchId(mBrushTexture);
|
int index = landtexturesCollection.searchId(mBrushTexture);
|
||||||
|
|
||||||
if (index != -1 && !landtexturesCollection.getRecord(index).isDeleted())
|
if (index != -1 && !landtexturesCollection.getRecord(index).isDeleted() && hit.hit == true)
|
||||||
{
|
{
|
||||||
editTerrainTextureGrid(hit);
|
editTerrainTextureGrid(hit);
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,7 @@ void CSVWidget::SceneToolTextureBrush::setButtonIcon (int brushShape)
|
|||||||
tooltip += landtexturesCollection.getData(index, landTextureFilename).value<QString>();
|
tooltip += landtexturesCollection.getData(index, landTextureFilename).value<QString>();
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
tooltip += "No selected texture or invalid texture";
|
tooltip += "<p>No selected texture or invalid texture";
|
||||||
}
|
}
|
||||||
|
|
||||||
tooltip += "<br>(drop texture here to change)";
|
tooltip += "<br>(drop texture here to change)";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user