X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=stemmaweb%2Flib%2Fstemmaweb%2FController%2FRoot.pm;h=cd6cb76d9fc848920fe4c4dbd7598e69f7bfb108;hb=7f52eac8cd00b160ea9e828790cbd093dc444feb;hp=de519581e2642ca24abf624a409b8bef182c2714;hpb=3e420a82df2d51189dd4d491f0470b59b3b8dcfb;p=scpubgit%2Fstemmatology.git diff --git a/stemmaweb/lib/stemmaweb/Controller/Root.pm b/stemmaweb/lib/stemmaweb/Controller/Root.pm index de51958..cd6cb76 100644 --- a/stemmaweb/lib/stemmaweb/Controller/Root.pm +++ b/stemmaweb/lib/stemmaweb/Controller/Root.pm @@ -70,9 +70,11 @@ Returns the variant graph for the text specified at $textid, in SVG form. sub variantgraph :Local :Args(1) { my( $self, $c, $textid ) = @_; my $m = $c->model('Directory'); - my $collation = $m->tradition( $textid )->collation; - + my $tradition = $m->tradition( $textid ); + my $collation = $tradition->collation; + my $needsave = !$collation->has_cached_svg; $c->stash->{'result'} = $collation->as_svg; + $m->save( $tradition ); $c->forward('View::SVG'); } @@ -88,7 +90,7 @@ sub alignment :Local :Args(1) { my( $self, $c, $textid ) = @_; my $m = $c->model('Directory'); my $collation = $m->tradition( $textid )->collation; - my $alignment = $collation->make_alignment_table; + my $alignment = $collation->alignment_table; # Turn the table, so that witnesses are by column and the rows # are by rank.