From 81d26755d2e79714648c6b9223241ef6ff4f8f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Thu, 19 Mar 2009 12:23:13 +0000 Subject: [PATCH] Fixed Decimater when removing priority module git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@85 fdac6126-5c0c-442c-9429-916003d36597 --- Tools/Decimater/DecimaterT.hh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Tools/Decimater/DecimaterT.hh b/Tools/Decimater/DecimaterT.hh index 7b6b71ee..3743868f 100644 --- a/Tools/Decimater/DecimaterT.hh +++ b/Tools/Decimater/DecimaterT.hh @@ -9,15 +9,15 @@ // License // // This library is free software; you can redistribute it and/or modify it -// under the terms of the GNU Lesser General Public License as published +// under the terms of the GNU Lesser General Public License as published // by the Free Software Foundation, version 2. // // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public +// You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // @@ -127,6 +127,13 @@ public: //--------------------------------------------------- module management if (!_mh.is_valid()) return false; + if ( cmodule_ == _mh.module() ) { + cmodule_ = 0; + initialized_ = false; // reset initialized state + _mh.clear(); + return true; + } + typename ModuleList::iterator it = std::find(bmodules_.begin(), bmodules_.end(), _mh.module() );