Commit 4c937c0e authored by Sylvain Thery's avatar Sylvain Thery

bugs

parent 7cb93846
......@@ -23,7 +23,8 @@ enum SelectionMethod
struct MapParameters
{
MapParameters() :
selectionMethod(SingleCell)
selectionMethod(SingleCell),
color(255,0,0)
{}
VertexAttribute<PFP2::VEC3, PFP2::MAP> positionAttribute;
......
......@@ -183,8 +183,8 @@ void Surface_Selection_Plugin::drawMap(View* view, MapHandlerGen* map)
case WithinSphere : {
PFP2::MAP* m = static_cast<MapHandler<PFP2>*>(map)->getMap();
std::vector<PFP2::VEC3> 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);
......
......@@ -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);
}
......
......@@ -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;
}
......
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