Gui: when closing application remove all manipulators

This commit is contained in:
wmayer
2023-10-05 16:28:18 +02:00
committed by Yorik van Havre
parent 728b867738
commit 823a8d593f
3 changed files with 12 additions and 0 deletions

View File

@@ -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();

View File

@@ -42,6 +42,11 @@ void WorkbenchManipulator::removeManipulator(const WorkbenchManipulator::Ptr& pt
}
}
void WorkbenchManipulator::removeAll()
{
manipulators.clear();
}
std::set<WorkbenchManipulator::Ptr> WorkbenchManipulator::getManipulators()
{
return manipulators;

View File

@@ -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