diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 0e62bc16d1..f1d4255f32 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -126,6 +126,7 @@ #include "WaitCursor.h" #include "Workbench.h" #include "WorkbenchManager.h" +#include "WorkbenchManipulator.h" #include "WidgetFactory.h" @@ -537,6 +538,7 @@ Application::~Application() { Base::Console().Log("Destruct Gui::Application\n"); WorkbenchManager::destruct(); + WorkbenchManipulator::removeAll(); SelectionSingleton::destruct(); Translator::destruct(); WidgetFactorySupplier::destruct(); diff --git a/src/Gui/WorkbenchManipulator.cpp b/src/Gui/WorkbenchManipulator.cpp index b266dfce92..560a9e2ad5 100644 --- a/src/Gui/WorkbenchManipulator.cpp +++ b/src/Gui/WorkbenchManipulator.cpp @@ -42,6 +42,11 @@ void WorkbenchManipulator::removeManipulator(const WorkbenchManipulator::Ptr& pt } } +void WorkbenchManipulator::removeAll() +{ + manipulators.clear(); +} + std::set WorkbenchManipulator::getManipulators() { return manipulators; diff --git a/src/Gui/WorkbenchManipulator.h b/src/Gui/WorkbenchManipulator.h index 97865d2701..c7995d044c 100644 --- a/src/Gui/WorkbenchManipulator.h +++ b/src/Gui/WorkbenchManipulator.h @@ -58,6 +58,11 @@ public: * Removes an installed instance of WorkbenchManipulator */ static void removeManipulator(const WorkbenchManipulator::Ptr&); + /*! + * \brief clear + * Removes all instances of WorkbenchManipulator + */ + static void removeAll(); /*! * \brief changeMenuBar * Calls \ref modifyMenuBar for every installed WorkbenchManipulator