+ Handle(HYDROData_Profile)::DownCast( aSelectedProfiles.Value( i ) );
+ if ( !aProfile.IsNull() ) {
+ QString aProfileName = aProfile->GetName();
+
+ // Check the profile, if all is ok - add it to the list
+ if ( !aProfile->IsValid() ) { // check whether the profile is valid
+ anInvalidProfiles << aProfileName;
+ } else if ( aCurrentProfiles.contains( aProfileName ) ) { // check whether the profile is already added
+ anExistingProfiles << aProfileName;
+ } else if ( !myEditedObject->HasIntersection( aProfile, aPlane, aPar ) ) { // check whether the profile has intersection
+ aHasNoIntersectionProfiles << aProfileName;
+ } else {
+ aVerifiedProfiles.Append( aProfile );
+ }
+ }
+ }
+
+ // Show message box with the ignored profiles
+ if ( !anInvalidProfiles.isEmpty() || !anExistingProfiles.isEmpty() ||
+ !aHasNoIntersectionProfiles.isEmpty() ) {
+ QString aMessage = tr( "IGNORED_PROFILES" );
+ if ( !anInvalidProfiles.isEmpty() ) {
+ aMessage.append( "\n\n" );
+ aMessage.append( tr("INVALID_PROFILES").arg( anInvalidProfiles.join( "\n" ) ) );
+ }
+ if ( !anExistingProfiles.isEmpty() ) {
+ aMessage.append( "\n\n" );
+ aMessage.append( tr("EXISTING_PROFILES").arg( anExistingProfiles.join( "\n" ) ) );
+ }
+ if ( !aHasNoIntersectionProfiles.isEmpty() ) {
+ aMessage.append( "\n\n" );
+ aMessage.append( tr("NOT_INTERSECTED_PROFILES").arg( aHasNoIntersectionProfiles.join( "\n" ) ) );
+ }