diff --git a/SCHNApps/Plugins/surface_selection/include/surface_selection.h b/SCHNApps/Plugins/surface_selection/include/surface_selection.h index 1708c32dbd51c2db5ced750a4275c79fcf41e8be..c9996de8ad0576de08eb0fb810968435a30198ba 100644 --- a/SCHNApps/Plugins/surface_selection/include/surface_selection.h +++ b/SCHNApps/Plugins/surface_selection/include/surface_selection.h @@ -23,7 +23,8 @@ enum SelectionMethod struct MapParameters { MapParameters() : - selectionMethod(SingleCell) + selectionMethod(SingleCell), + color(255,0,0) {} VertexAttribute positionAttribute; diff --git a/SCHNApps/Plugins/surface_selection/src/surface_selection.cpp b/SCHNApps/Plugins/surface_selection/src/surface_selection.cpp index d22434cfef5c8adcd8d931f0fe23e66028ba6e6a..5b92a7e099550de163fff7d6888f1567b242a2c9 100644 --- a/SCHNApps/Plugins/surface_selection/src/surface_selection.cpp +++ b/SCHNApps/Plugins/surface_selection/src/surface_selection.cpp @@ -183,8 +183,8 @@ void Surface_Selection_Plugin::drawMap(View* view, MapHandlerGen* map) case WithinSphere : { PFP2::MAP* m = static_cast*>(map)->getMap(); std::vector selectionPoint; - selectionPoint.push_back((p.positionAttribute[m_selectingEdge.dart] + (p.positionAttribute[m->phi1(m_selectingEdge.dart)])/2.0f)); - //selectionPoint.push_back(p.positionAttribute[m_selectingEdge.dart]); + selectionPoint.push_back((p.positionAttribute[m_selectingEdge.dart] + p.positionAttribute[m->phi1(m_selectingEdge.dart)])/2.0f); + // selectionPoint.push_back(p.positionAttribute[m_selectingEdge.dart]); m_selectionSphereVBO->updateData(selectionPoint); m_pointSprite->setAttributePosition(m_selectionSphereVBO); diff --git a/SCHNApps/Plugins/surface_selection/src/surface_selection_dockTab.cpp b/SCHNApps/Plugins/surface_selection/src/surface_selection_dockTab.cpp index 3cf9f7c75a8ac7ce31c0d8a8df8f899694f0254c..52e12fba0fba2a788ee7d1ffad2e006830c4ffa0 100644 --- a/SCHNApps/Plugins/surface_selection/src/surface_selection_dockTab.cpp +++ b/SCHNApps/Plugins/surface_selection/src/surface_selection_dockTab.cpp @@ -26,7 +26,7 @@ Surface_Selection_DockTab::Surface_Selection_DockTab(SCHNApps* s, Surface_Select connect(combo_color, SIGNAL(currentIndexChanged(int)), this, SLOT(colorChanged(int))); // force color for map parameter updating - combo_color->setCurrentIndex(0); +// combo_color->setCurrentIndex(0); } diff --git a/SCHNApps/src/controlDock_mapTab.cpp b/SCHNApps/src/controlDock_mapTab.cpp index 1361965546c9ea14a8e1fd02c704d95819a9d448..44e1c408521e45c107480c95f01d00d07c46e0de 100644 --- a/SCHNApps/src/controlDock_mapTab.cpp +++ b/SCHNApps/src/controlDock_mapTab.cpp @@ -237,10 +237,9 @@ void ControlDock_MapTab::selectedSelectorChanged() m_selectedSelector[orbit] = m_selectedMap->getCellSelector(orbit, items[0]->text()); m_schnapps->notifySelectedCellSelectorChanged(m_selectedSelector[orbit]); - // RECORDING TODO QTextStream* rec = m_schnapps->pythonStreamRecorder(); if (rec) - *rec << m_selectedMap->getName() << ".setSelectedSelector(" << orbit << ", \"" << items[0]->text() << "\");" << endl; + *rec << "schnapps.setSelectedSelectorCurrentMap(" << orbit << ", \"" << items[0]->text() << "\");" << endl; } } @@ -489,6 +488,35 @@ void ControlDock_MapTab::updateSelectedMapInfo() } } } + else + { + for (unsigned int orbit = DART; orbit <= VOLUME; ++orbit) + { + switch (orbit) + { + case DART : + label_dartNbOrbits->setText(QString::number(0)); + label_dartNbCells->setText(QString::number(0)); + break; + case VERTEX : + label_vertexNbOrbits->setText(QString::number(0)); + label_vertexNbCells->setText(QString::number(0)); + break; + case EDGE : + label_edgeNbOrbits->setText(QString::number(0)); + label_edgeNbCells->setText(QString::number(0)); + break; + case FACE : + label_faceNbOrbits->setText(QString::number(0)); + label_faceNbCells->setText(QString::number(0)); + break; + case VOLUME : + label_volumeNbOrbits->setText(QString::number(0)); + label_volumeNbCells->setText(QString::number(0)); + break; + } + } + } b_updatingUI = false; }