@@ -452,7 +452,7 @@ private void AddContactDefinitions(Network network, CodeBlock block)
452452 }
453453 }
454454
455- static string debug = "" ;
455+ static string debug = null ;
456456
457457 private void AddWires ( IOperationOrSignal op )
458458 {
@@ -574,11 +574,11 @@ private void AddWires(IOperationOrSignal op)
574574 _currentId ++ ;
575575 }
576576 else if ( op is Or && op . Children . Count > 1 )
577- {
577+ {
578578 int i = 1 ;
579579 foreach ( var ch in op . Children )
580580 {
581- if ( ch is And && ch . Children . Last ( ) is Or ) //Todo nur ein letztes or im End , könnte weiter verschachtelt sein
581+ if ( ch is And && ch . Children . Last ( ) is Or ) //Todo nur ein letztes or im and , könnte weiter verschachtelt sein
582582 {
583583 foreach ( var ch2 in ch . Children . Last ( ) . Children )
584584 {
@@ -662,7 +662,7 @@ private void AddWires(IOperationOrSignal op)
662662 if ( next is Or )
663663 {
664664 _sb . AppendLine ( "<Wire UId=\" " + _currentId + "\" >" + ( debug ?? ( "<!-- Wire And next Or -->" ) ) ) ;
665- _sb . AppendLine ( "<NameCon UId=\" " + ch . OperationId + "\" Name=\" out\" />" ) ;
665+ _sb . AppendLine ( "<NameCon UId=\" " + ch . OperationId + "\" Name=\" out\" />" + ( ch is Signal ? " <!-- " + ( ( Signal ) ch ) . Name + " -->" : "" ) ) ;
666666 foreach ( var orSignal in next . Children )
667667 {
668668 foreach ( var os in GetAllOrSignals ( orSignal ) )
@@ -674,7 +674,7 @@ private void AddWires(IOperationOrSignal op)
674674 {
675675 ipName = "pre" ;
676676 }
677- _sb . AppendLine ( "<NameCon UId=\" " + opId + "\" Name=\" " + ipName + "\" />" ) ;
677+ _sb . AppendLine ( "<NameCon UId=\" " + opId + "\" Name=\" " + ipName + "\" />" + ( os is Signal ? " <!-- " + ( ( Signal ) os ) . Name + " -->" : "" ) ) ;
678678 }
679679 }
680680 _sb . AppendLine ( "</Wire>" ) ;
0 commit comments