diff --git a/apps/opencs/view/render/pathgridmode.cpp b/apps/opencs/view/render/pathgridmode.cpp index 87ec80556..228b2b5e7 100644 --- a/apps/opencs/view/render/pathgridmode.cpp +++ b/apps/opencs/view/render/pathgridmode.cpp @@ -35,10 +35,10 @@ namespace CSVRender { return QString( "Pathgrid editing" - "
Note: Only a single cell's pathgrid may be edited at a time"); } @@ -53,6 +53,16 @@ namespace CSVRender toolbar->addTool(mSelectionMode); } + void PathgridMode::deactivate(CSVWidget::SceneToolbar* toolbar) + { + if (mSelectionMode) + { + toolbar->removeTool (mSelectionMode); + delete mSelectionMode; + mSelectionMode = 0; + } + } + void PathgridMode::primaryEditPressed(const WorldspaceHitResult& hitResult) { if (CSMPrefs::get()["3D Scene Input"]["context-select"].isTrue() && diff --git a/apps/opencs/view/render/pathgridmode.hpp b/apps/opencs/view/render/pathgridmode.hpp index 908eefa5b..e34208f8c 100644 --- a/apps/opencs/view/render/pathgridmode.hpp +++ b/apps/opencs/view/render/pathgridmode.hpp @@ -19,6 +19,8 @@ namespace CSVRender virtual void activate(CSVWidget::SceneToolbar* toolbar); + virtual void deactivate(CSVWidget::SceneToolbar* toolbar); + virtual void primaryEditPressed(const WorldspaceHitResult& hit); virtual void secondaryEditPressed(const WorldspaceHitResult& hit);