Commit 08a1115a authored by Victor Poughon's avatar Victor Poughon

REFAC: remove sharedGlWidget global share context

parent da115870
Pipeline #3233 passed with stages
in 70 minutes
......@@ -236,11 +236,11 @@ private:
private:
/**
*/
ImageViewWidget* CreateImageViewWidget(QOpenGLWidget* sharedGlWidget = NULL);
ImageViewWidget* CreateImageViewWidget();
/**
*/
ImageViewWidget* CreateQuicklookViewWidget(QOpenGLWidget* sharedGlWidget = NULL);
ImageViewWidget* CreateQuicklookViewWidget();
/**
*/
......
......@@ -610,7 +610,7 @@ void MainWindow::InitializeDockWidgets()
// Quicklook-view dock-widget
assert(m_QuicklookViewDock == NULL);
assert(m_ImageView != NULL);
m_QuicklookViewDock = AddWidgetToDock(CreateQuicklookViewWidget(m_ImageView), "QUICKLOOK_VIEW", tr("Quicklook view"), Qt::RightDockWidgetArea);
m_QuicklookViewDock = AddWidgetToDock(CreateQuicklookViewWidget(), "QUICKLOOK_VIEW", tr("Quicklook view"), Qt::RightDockWidgetArea);
// Histogram-view.
assert(m_HistogramDock == NULL);
......@@ -722,7 +722,7 @@ void MainWindow::InitializeStatusBarWidgets()
}
/*****************************************************************************/
ImageViewWidget* MainWindow::CreateImageViewWidget(QOpenGLWidget* sharedGlWidget)
ImageViewWidget* MainWindow::CreateImageViewWidget()
{
ImageViewRenderer* renderer = new ImageViewRenderer(this);
......@@ -734,7 +734,7 @@ ImageViewWidget* MainWindow::CreateImageViewWidget(QOpenGLWidget* sharedGlWidget
ImageViewWidget* imageView = new ImageViewWidget(manipulator, // (will be reparented.)
renderer, // (will be reparented.)
this, sharedGlWidget);
this);
imageView->setMinimumWidth(256);
......@@ -742,7 +742,7 @@ ImageViewWidget* MainWindow::CreateImageViewWidget(QOpenGLWidget* sharedGlWidget
}
/*****************************************************************************/
ImageViewWidget* MainWindow::CreateQuicklookViewWidget(QOpenGLWidget* sharedGlWidget)
ImageViewWidget* MainWindow::CreateQuicklookViewWidget()
{
QuicklookViewRenderer* renderer = new QuicklookViewRenderer(this);
......@@ -754,7 +754,7 @@ ImageViewWidget* MainWindow::CreateQuicklookViewWidget(QOpenGLWidget* sharedGlWi
ImageViewWidget* quicklookView = new ImageViewWidget(manipulator, // (will be reparented.)
renderer, // (will be reparented.)
this, sharedGlWidget);
this);
quicklookView->SetPickingEnabled(false);
quicklookView->SetPickingDefaultStatus(false);
......
......@@ -92,7 +92,7 @@ public:
// Public methods.
public:
/** \brief Constructor. */
ImageViewWidget(AbstractImageViewManipulator* manipulator, AbstractImageViewRenderer* renderer, QWidget* p = NULL, const QOpenGLWidget* shareWidget = NULL,
ImageViewWidget(AbstractImageViewManipulator* manipulator, AbstractImageViewRenderer* renderer, QWidget* p = NULL,
Qt::WindowFlags f = 0);
/** \brief Destructor. */
......
......@@ -71,7 +71,7 @@ namespace mvd
/*****************************************************************************/
/* CLASS IMPLEMENTATION SECTION */
/*******************************************************************************/
ImageViewWidget::ImageViewWidget(AbstractImageViewManipulator* manipulator, AbstractImageViewRenderer* renderer, QWidget* p, const QOpenGLWidget* shareWidget,
ImageViewWidget::ImageViewWidget(AbstractImageViewManipulator* manipulator, AbstractImageViewRenderer* renderer, QWidget* p,
Qt::WindowFlags flags)
: QOpenGLWidget(p, flags),
m_IsPickingEnabled(true),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment