X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_DataModelSync.cxx;h=b73f3a401405c9bff23c0feb8c1af39552113735;hb=d6e19029f8b41f295db878e9aecf451c2edda4af;hp=58808f117e2674f6d9431c5ab31bf9d5bea8c2b7;hpb=677e8367763ad6f2e08e9c0d4799b7ad7ef389ac;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_DataModelSync.cxx b/src/HYDROGUI/HYDROGUI_DataModelSync.cxx index 58808f11..b73f3a40 100644 --- a/src/HYDROGUI/HYDROGUI_DataModelSync.cxx +++ b/src/HYDROGUI/HYDROGUI_DataModelSync.cxx @@ -1,6 +1,24 @@ +// 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 +#include HYDROGUI_DataModelSync::HYDROGUI_DataModelSync( SUIT_DataObject* theRoot ) : myRoot( theRoot ) @@ -16,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