From ed54491d1055434b99ce5bde9cd40533610ab0c3 Mon Sep 17 00:00:00 2001 From: Paolo Cignoni Date: Fri, 16 Jun 2017 11:29:38 +0200 Subject: [PATCH] Corrected the error in selection.h that broke the build.... --- vcg/complex/algorithms/update/selection.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vcg/complex/algorithms/update/selection.h b/vcg/complex/algorithms/update/selection.h index 0c18d1ba..f056ec11 100644 --- a/vcg/complex/algorithms/update/selection.h +++ b/vcg/complex/algorithms/update/selection.h @@ -84,6 +84,8 @@ public: bool pop(bool orFlag=false, bool andFlag=false) { if(vsV.empty()) return false; + if(orFlag && andFlag) return false; + vsHandle vsH = vsV.back(); esHandle esH = esV.back(); fsHandle fsH = fsV.back(); @@ -102,7 +104,7 @@ public: for(auto ei = _m->edge.begin(); ei != _m->edge.end(); ++ei) if( !(*ei).IsD() ) { - if(vsH[*ei]) { + if(esH[*ei]) { if(!andFlag) (*ei).SetS(); } else { if(!orFlag) (*ei).ClearS(); @@ -113,7 +115,7 @@ public: for(auto fi = _m->face.begin(); fi != _m->face.end(); ++fi) if( !(*fi).IsD() ) { - if(vsH[*fi]) { + if(fsH[*fi]) { if(!andFlag) (*fi).SetS(); } else { if(!orFlag) (*fi).ClearS();