diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index a590a65b27e..80cbee92bf6 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -1133,7 +1133,7 @@ void MainWindow::open(QString filename) default: load_pair = File_loader_dialog::getItem(fileinfo.fileName(), selected_items, &ok); } - viewer->makeCurrent(); + //viewer->makeCurrent(); if(!ok || load_pair.first.isEmpty()) { return; } if (load_pair.second) @@ -1856,7 +1856,8 @@ void MainWindow::on_actionLoad_triggered() dialog.setFileMode(QFileDialog::ExistingFiles); if(dialog.exec() != QDialog::Accepted) { return; } - viewer->update(); + for(auto v : CGAL::QGLViewer::QGLViewerPool()) + v->update(); FilterPluginMap::iterator it = filterPluginMap.find(dialog.selectedNameFilter()); @@ -2012,7 +2013,8 @@ void MainWindow::on_actionSaveAs_triggered() { filename = filename.append(filter_ext); } - viewer->update(); + for(auto v : CGAL::QGLViewer::QGLViewerPool()) + v->update(); save(filename, item); } } @@ -2295,7 +2297,7 @@ void MainWindow::setBackgroundColor() void MainWindow::setLighting_triggered() { - viewer->setLighting(); + qobject_cast(CGAL::Three::Three::activeViewer())->setLighting(); } void MainWindow::viewerShowObject() @@ -2544,7 +2546,8 @@ void MainWindow::setExpanded(QModelIndex index) void MainWindow::setMaxTextItemsDisplayed(int val) { - viewer->textRenderer()->setMax(val); + for(auto v : CGAL::QGLViewer::QGLViewerPool()) + qobject_cast(v)->textRenderer()->setMax(val); } void MainWindow::resetHeader() @@ -2603,7 +2606,8 @@ void MainWindow::colorItems() { scene->item(id)->setColor(colors_[++nb_item]); } - viewer->update(); + for(auto v : CGAL::QGLViewer::QGLViewerPool()) + v->update(); } @@ -3023,9 +3027,6 @@ SubViewer::SubViewer(QWidget *parent, MainWindow* mw, Viewer* mainviewer) actionOrtho->setCheckable(true); actionOrtho->setChecked(false); viewMenu->addAction(actionOrtho); - QAction* actionLight = new QAction("L&ighting...",this); - actionLight->setObjectName("actionLight"); - viewMenu->addAction(actionLight); QAction* actionTotalPass = new QAction("Set Transparency Pass &Number...",this); actionTotalPass->setObjectName("actionTotalPass"); viewMenu->addAction(actionTotalPass);