aboutsummaryrefslogtreecommitdiff
path: root/visualization/qmpvisualization.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'visualization/qmpvisualization.hpp')
-rw-r--r--visualization/qmpvisualization.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/visualization/qmpvisualization.hpp b/visualization/qmpvisualization.hpp
index b52fa3d..f9e6062 100644
--- a/visualization/qmpvisualization.hpp
+++ b/visualization/qmpvisualization.hpp
@@ -113,7 +113,13 @@ class CloseHandler:public smHandler
public:
CloseHandler(qmpVisualization* par){p=par;}
public:
- bool handlerFunc(){return true;}
+ bool handlerFunc()
+ {
+ std::thread ([this]{
+ p->api->setFuncState("Visualization",false);
+ p->close();}).detach();
+ return false;
+ }
};
class CDemoVisualization:public qmpVisualizationIntf