From 8ae46519cf3df1ea4a136c49532218f6938351a7 Mon Sep 17 00:00:00 2001 From: Nelsson Huotari Date: Sun, 20 May 2018 21:58:40 +0300 Subject: [PATCH] Fix missed worldspacehits, add linebreak to tooltip --- apps/opencs/view/render/terraintexturemode.cpp | 6 +++--- apps/opencs/view/widget/scenetooltexturebrush.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/opencs/view/render/terraintexturemode.cpp b/apps/opencs/view/render/terraintexturemode.cpp index dac744ae6..d312c28d9 100644 --- a/apps/opencs/view/render/terraintexturemode.cpp +++ b/apps/opencs/view/render/terraintexturemode.cpp @@ -90,7 +90,7 @@ void CSVRender::TerrainTextureMode::primaryEditPressed(const WorldspaceHitResult CSMWorld::IdCollection& landtexturesCollection = document.getData().getLandTextures(); 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"); if(allowLandTextureEditing(mCellId)==true) @@ -130,7 +130,7 @@ bool CSVRender::TerrainTextureMode::primaryEditStartDrag (const QPoint& pos) if (index != -1 && !landtexturesCollection.getRecord(index).isDeleted()) { undoStack.beginMacro ("Edit texture records"); - if(allowLandTextureEditing(mCellId)==true) + if(allowLandTextureEditing(mCellId)==true && hit.hit == true) { undoStack.push (new CSMWorld::TouchLandCommand(landTable, ltexTable, mCellId)); editTerrainTextureGrid(hit); @@ -163,7 +163,7 @@ void CSVRender::TerrainTextureMode::drag (const QPoint& pos, int diffX, int diff CSMWorld::IdCollection& landtexturesCollection = document.getData().getLandTextures(); int index = landtexturesCollection.searchId(mBrushTexture); - if (index != -1 && !landtexturesCollection.getRecord(index).isDeleted()) + if (index != -1 && !landtexturesCollection.getRecord(index).isDeleted() && hit.hit == true) { editTerrainTextureGrid(hit); } diff --git a/apps/opencs/view/widget/scenetooltexturebrush.cpp b/apps/opencs/view/widget/scenetooltexturebrush.cpp index a58b98bdd..d8d4600e5 100644 --- a/apps/opencs/view/widget/scenetooltexturebrush.cpp +++ b/apps/opencs/view/widget/scenetooltexturebrush.cpp @@ -248,7 +248,7 @@ void CSVWidget::SceneToolTextureBrush::setButtonIcon (int brushShape) tooltip += landtexturesCollection.getData(index, landTextureFilename).value(); } else { - tooltip += "No selected texture or invalid texture"; + tooltip += "

No selected texture or invalid texture"; } tooltip += "
(drop texture here to change)";