X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_Region.cxx;h=a53ddc78507d851add33c532b38790a02c26628a;hb=81c9f5cdf82909d0aebd2c491c50fa7516cc80b7;hp=15722904a6c296dcf89ed5e41984500eb228bd83;hpb=bfe9d3ccf8d5347b917d4c9e5e89413cebe51cc6;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_Region.cxx b/src/HYDROGUI/HYDROGUI_Region.cxx index 15722904..a53ddc78 100644 --- a/src/HYDROGUI/HYDROGUI_Region.cxx +++ b/src/HYDROGUI/HYDROGUI_Region.cxx @@ -32,17 +32,30 @@ HYDROGUI_Region::HYDROGUI_Region( SUIT_DataObject* theParent, Handle(HYDROData_Region) theData, - const QString& theParentEntry ) -: HYDROGUI_DataObject( theParent, theData, theParentEntry ), CAM_DataObject( theParent ) + const QString& theParentEntry, + const bool theIsInOperation ) +: HYDROGUI_DataObject( theParent, theData, theParentEntry, theIsInOperation ), CAM_DataObject( theParent ) { } -void HYDROGUI_Region::addZones( ) +bool HYDROGUI_Region::addZones( const QList& theZonesList ) { Handle(HYDROData_Region) aRegion = Handle(HYDROData_Region)::DownCast( modelObject() ); - if ( !aRegion.IsNull() ) + bool isOk = !aRegion.IsNull(); + if ( isOk ) { - // TODO: Add zones - ; + Handle(HYDROData_Zone) aZone; + for (int i = 0; i < theZonesList.length(); i++ ) + { + aZone = Handle(HYDROData_Zone)::DownCast( theZonesList.at(i)->modelObject() ); + if ( !aZone.IsNull() ) + { + if ( !( aRegion->AddZone( aZone ) ) ) + { + isOk = false; + } + } + } } + return isOk; }