Commit 02828305 authored by Mike Kremer's avatar Mike Kremer

Fixed missing selection of face with id 0 bug.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8275 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 31b94f00
...@@ -516,11 +516,11 @@ void convertEdgeToFaceSelection(MeshT* _mesh, std::vector< int >& _edges) { ...@@ -516,11 +516,11 @@ void convertEdgeToFaceSelection(MeshT* _mesh, std::vector< int >& _edges) {
template< typename MeshT > template< typename MeshT >
inline inline
void selectFaces(MeshT* _mesh, std::vector< int >& _faces) { void selectFaces(MeshT* _mesh, IdList& _faces) {
const int n_faces = (int)_mesh->n_faces(); const int n_faces = (int)_mesh->n_faces();
for ( uint i = 0 ; i < _faces.size() ; ++i ) for ( uint i = 0 ; i < _faces.size() ; ++i )
if ( (_faces[i] > 0) && ( _faces[i] < n_faces ) ) { if ( (_faces[i] >= 0) && ( _faces[i] < n_faces ) ) {
typename MeshT::FaceHandle fh(_faces[i]); typename MeshT::FaceHandle fh(_faces[i]);
_mesh->status(fh).set_selected(true); _mesh->status(fh).set_selected(true);
} }
...@@ -530,11 +530,11 @@ void selectFaces(MeshT* _mesh, std::vector< int >& _faces) { ...@@ -530,11 +530,11 @@ void selectFaces(MeshT* _mesh, std::vector< int >& _faces) {
template< typename MeshT > template< typename MeshT >
inline inline
void unselectFaces(MeshT* _mesh, std::vector< int >& _faces) { void unselectFaces(MeshT* _mesh, IdList& _faces) {
const int n_faces = (int)_mesh->n_faces(); const int n_faces = (int)_mesh->n_faces();
for ( uint i = 0 ; i < _faces.size() ; ++i ) for ( uint i = 0 ; i < _faces.size() ; ++i )
if ( (_faces[i] > 0) && ( _faces[i] < n_faces ) ) { if ( (_faces[i] >= 0) && ( _faces[i] < n_faces ) ) {
typename MeshT::FaceHandle fh(_faces[i]); typename MeshT::FaceHandle fh(_faces[i]);
_mesh->status(fh).set_selected(false); _mesh->status(fh).set_selected(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