Draw up to three selected faces

pull/1322/head
ruevs 2022-07-09 02:12:02 +03:00 committed by Paul Kahler
parent 7d5eaffa89
commit adb2768154
2 changed files with 5 additions and 0 deletions

View File

@ -193,6 +193,8 @@ void GraphicsWindow::MakeSelected(Selection *stog) {
hEntity he = s->entity; hEntity he = s->entity;
if(he.v != 0 && SK.GetEntity(he)->IsFace()) { if(he.v != 0 && SK.GetEntity(he)->IsFace()) {
c++; c++;
// Modify also Group::DrawMesh "case DrawMeshAs::SELECTED:"
// Magic numers are ugly :-(
if(c >= 3) s->tag = 1; if(c >= 3) s->tag = 1;
} }
} }

View File

@ -635,8 +635,11 @@ void Group::DrawMesh(DrawMeshAs how, Canvas *canvas) {
std::vector<uint32_t> faces; std::vector<uint32_t> faces;
SS.GW.GroupSelection(); SS.GW.GroupSelection();
auto const &gs = SS.GW.gs; auto const &gs = SS.GW.gs;
// Modify also GraphicsWindow::MakeSelected "if(c >= 3) s->tag = 1;"
// Magic numers are ugly :-(
if(gs.faces > 0) faces.push_back(gs.face[0].v); if(gs.faces > 0) faces.push_back(gs.face[0].v);
if(gs.faces > 1) faces.push_back(gs.face[1].v); if(gs.faces > 1) faces.push_back(gs.face[1].v);
if(gs.faces > 2) faces.push_back(gs.face[2].v);
canvas->DrawFaces(displayMesh, faces, hcf); canvas->DrawFaces(displayMesh, faces, hcf);
break; break;
} }