X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_DataModelSync.cxx;h=b73f3a401405c9bff23c0feb8c1af39552113735;hb=d6e19029f8b41f295db878e9aecf451c2edda4af;hp=36405be28d475db41d61584166853f7f80a1ce5a;hpb=1073d87e6e54f5d2e26d627059a0042c543beb9b;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_DataModelSync.cxx b/src/HYDROGUI/HYDROGUI_DataModelSync.cxx index 36405be2..b73f3a40 100644 --- a/src/HYDROGUI/HYDROGUI_DataModelSync.cxx +++ b/src/HYDROGUI/HYDROGUI_DataModelSync.cxx @@ -1,3 +1,20 @@ +// Copyright (C) 2014-2015 EDF-R&D +// 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 by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// 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. +// +// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #include #include @@ -17,12 +34,8 @@ void HYDROGUI_DataModelSync::deleteItemWithChildren( const suitPtr& theSuitPtr ) if( !theSuitPtr ) return; - DataObjectList aChildren; - theSuitPtr->children( aChildren ); - foreach( SUIT_DataObject* anObj, aChildren ) - deleteItemWithChildren( anObj ); - - delete theSuitPtr; + theSuitPtr->setAutoDeleteChildren( true ); + theSuitPtr->deleteLater(); } suitPtr HYDROGUI_DataModelSync::nullSrc() const