From 102ed11c66951b9d1841608eca10ac5b42f98a31 Mon Sep 17 00:00:00 2001 From: ccremers Date: Wed, 12 May 2004 15:13:21 +0000 Subject: [PATCH] - Fixed the 'learns' order issue. --- src/latex.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/latex.c b/src/latex.c index de3bcf8..998547d 100644 --- a/src/latex.c +++ b/src/latex.c @@ -937,12 +937,6 @@ attackDisplayLatex (System sys) switch (tb->event[i]->type) { case SEND: - - /* TODO issue: this causes the knowledge learning to be printed - * before the actual read arrow is drawn, which is not what we - * want. We would like to see the learning after it. - */ - newtl = knowledgeNew (tb->know[i], tb->know[i + 1]); highlights = NULL; /* Build a Termlist of terms that from the claimViolationDetails, @@ -959,13 +953,6 @@ attackDisplayLatex (System sys) tl = tl->next; } - /* print what was learned */ - - printf ("\\action{learns $"); - cKnowledge++; - latexTermlistPrint (newtl, highlights); - printf ("$}{eve}\n"); - printf ("\\nextlevel[2]\n"); } if (tb->link[i] != -1 && i < tb->length) @@ -976,6 +963,20 @@ attackDisplayLatex (System sys) { latexMessagePrintHighlight (tb, i, -1, highlights); //lost message } + + /* maybe extra knowledge? */ + if (newtl != NULL) + { + /* print what was learned */ + + printf ("\\nextlevel[1]\n"); + printf ("\\action{learns $"); + cKnowledge++; + latexTermlistPrint (newtl, highlights); + printf ("$}{eve}\n"); + printf ("\\nextlevel[1]\n"); + } + termlistDelete (highlights); break;