diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp index 934ccceda55..4b7f9b91271 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp @@ -135,7 +135,7 @@ void Scene_polyhedron_shortest_path_item_priv::initialize_buffers(CGAL::Three::V { //vao containing the data for the selected lines { - program = item->getShaderProgram(Scene_polyhedron_shortest_path_item::PROGRAM_WITHOUT_LIGHT, viewer); + program = item->getShaderProgram(Scene_polyhedron_shortest_path_item::PROGRAM_NO_SELECTION, viewer); item->vaos[Selected_Edges]->bind(); program->bind(); item->buffers[Vertices].bind(); @@ -184,8 +184,8 @@ void Scene_polyhedron_shortest_path_item::drawPoints(CGAL::Three::Viewer_interfa d->initialize_buffers(viewer); } glPointSize(4.0f); - d->program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attribBuffers(viewer, PROGRAM_WITHOUT_LIGHT); + d->program = getShaderProgram(PROGRAM_NO_SELECTION); + attribBuffers(viewer, PROGRAM_NO_SELECTION); vaos[Scene_polyhedron_shortest_path_item_priv::Selected_Edges]->bind(); d->program->bind(); d->program->setAttributeValue("colors", QColor(Qt::green)); @@ -459,6 +459,7 @@ bool Scene_polyhedron_shortest_path_item_priv::run_point_select(const Ray_3& ray polylines->setColor(Qt::red); this->m_sceneInterface->setSelectedItem(-1); this->m_sceneInterface->addItem(polylines); + this->m_sceneInterface->changeGroup(polylines, item->parentGroup()); } else { diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp index d7d3666e84f..3a65a49c8be 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp @@ -1,5 +1,6 @@ #include #include +#include #include "Messages_interface.h" #include "Scene_polyhedron_item.h" @@ -230,7 +231,12 @@ void Polyhedron_demo_shortest_path_plugin::on_actionMakeShortestPaths_triggered( dock_widget->show(); dock_widget->raise(); // The other parts of initialization will be handled by the 'new_item' callback - scene->addItem(new Scene_polyhedron_shortest_path_item(polyhedronItem, this->scene, this->m_messages, this->mw)); + Scene_group_item* group = new Scene_group_item(QString("%1 Shortest Path").arg(polyhedronItem->name())); + Scene_polyhedron_shortest_path_item* sp_item =new Scene_polyhedron_shortest_path_item(polyhedronItem, this->scene, this->m_messages, this->mw); + sp_item->setName(tr("Source Points for %1").arg(polyhedronItem->name())); + scene->addItem(sp_item); + scene->addItem(group); + scene->changeGroup(sp_item, group); } else { diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_widget.ui b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_widget.ui index a01d7edbd08..754cb69a3bc 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_widget.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_widget.ui @@ -6,62 +6,83 @@ 0 0 - 334 - 402 + 441 + 257 - Shortest_path + Shortest Path - - - - - Shortest_path &Type: - - - Selection_type_combo_box + + + + + Operation + + + + + + Insert Source Point + + + + + Remove Source Point + + + + + Insert Target and Compute Path + + + + + - - - - - Insertion - - - - - Removal - - - - - Compute Path - - + + + + Source/Target on: + + + + + + + Vertex + + + + + Edge + + + + + Face + + + + + - - - - - Vertex - - - - - Edge - - - - - Face - - - + + + + Qt::Vertical + + + + 20 + 40 + + +