diff --git a/GraphicsView/include/CGAL/Qt/mouseGrabber_impl.h b/GraphicsView/include/CGAL/Qt/mouseGrabber_impl.h index 656580f3e9c..e573b9614c6 100644 --- a/GraphicsView/include/CGAL/Qt/mouseGrabber_impl.h +++ b/GraphicsView/include/CGAL/Qt/mouseGrabber_impl.h @@ -39,7 +39,12 @@ using namespace qglviewer; CGAL_INLINE_FUNCTION QList &MouseGrabber::MouseGrabberPool() { static QList MouseGrabberPool_; - return MouseGrabberPool_; + void* p = qApp->property("qglviewer mouse grabber pool").value(); + if(p == 0) { + p = (void*)(&MouseGrabberPool_); + qApp->setProperty("qglviewer mouse grabber pool", QVariant::fromValue(p)); + } + return *static_cast * >(p); } /*! Default constructor. diff --git a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h index 38fadcd500b..656343d5deb 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h @@ -66,7 +66,12 @@ using namespace qglviewer; CGAL_INLINE_FUNCTION QList &QGLViewer::QGLViewerPool() { static QList QGLViewerPool_; - return QGLViewerPool_; + void* p = qApp->property("qglviewer pool").value(); + if(p == 0) { + p = (void*)(&QGLViewerPool_); + qApp->setProperty("qglviewer pool", QVariant::fromValue(p)); + } + return *static_cast * >(p); } /*! \mainpage