drop collations on global relationship setting too
Tara L Andrews [Wed, 18 Apr 2012 18:17:46 +0000 (20:17 +0200)]
lib/Text/Tradition/Collation/RelationshipStore.pm

index 0dc6a2d..c5694ad 100644 (file)
@@ -216,6 +216,7 @@ sub add_relationship {
                # Check the options
                $options->{'scope'} = 'local' unless $options->{'scope'};
                $options->{'scope'} = 'local' if $options->{'type'} eq 'collated';
+               $options->{'scope'} = 'local' if $options->{'type'} eq 'transposition';
                
                my( $is_valid, $reason ) = 
                        $self->relationship_valid( $source, $target, $options->{'type'} );
@@ -265,6 +266,7 @@ sub add_relationship {
                                next;
                }
        }
+       map { $self->_drop_collations( $_ ) } @$v;
        $self->_set_relationship( $relationship, @$v );
        push( @pairs_set, $v );
     }