Merge pull request #6132 from sloriot/Demo-normal_plugin

Create normal map only if normal estimation is done
This commit is contained in:
Laurent Rineau 2021-11-25 17:28:37 +01:00
commit f02e5cffe9
2 changed files with 9 additions and 5 deletions

View File

@ -227,6 +227,10 @@ MainWindow::MainWindow(const QStringList &keywords, bool verbose, QWidget* paren
connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
this, SLOT(updateInfo()));
connect(scene, &Scene::dataChanged,
this, [this]() { filterOperations(false); });
connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
this, SLOT(updateDisplayInfo()));

View File

@ -202,6 +202,11 @@ void Polyhedron_demo_point_set_normal_estimation_plugin::on_actionNormalEstimati
if(item)
{
// Gets options
Point_set_demo_normal_estimation_dialog dialog;
if(!dialog.exec())
return;
// Gets point set
Point_set* points = item->point_set();
if(points == nullptr)
@ -209,11 +214,6 @@ void Polyhedron_demo_point_set_normal_estimation_plugin::on_actionNormalEstimati
if (!(points->has_normal_map()))
points->add_normal_map();
// Gets options
Point_set_demo_normal_estimation_dialog dialog;
if(!dialog.exec())
return;
QApplication::setOverrideCursor(Qt::BusyCursor);
QApplication::processEvents();