From 96be82a04719478217789628fcf19292cf8720c2 Mon Sep 17 00:00:00 2001 From: Nelsson Huotari Date: Mon, 7 Oct 2019 22:32:50 +0300 Subject: [PATCH] Remove terrain vertex selection and brush button when exiting editMode --- apps/opencs/view/render/terrainshapemode.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/opencs/view/render/terrainshapemode.cpp b/apps/opencs/view/render/terrainshapemode.cpp index 171ad5a27..8da50ada3 100644 --- a/apps/opencs/view/render/terrainshapemode.cpp +++ b/apps/opencs/view/render/terrainshapemode.cpp @@ -82,6 +82,16 @@ void CSVRender::TerrainShapeMode::activate(CSVWidget::SceneToolbar* toolbar) void CSVRender::TerrainShapeMode::deactivate(CSVWidget::SceneToolbar* toolbar) { + if(mShapeBrushScenetool) + { + toolbar->removeTool (mShapeBrushScenetool); + } + + if (mTerrainShapeSelection) + { + mTerrainShapeSelection.reset(); + } + EditMode::deactivate(toolbar); }