@@ -453,7 +453,7 @@ proc ::tree::displayLines { baseNumber moves } {
453453 set hasPositionComment 1
454454 set firstLine [ lindex [split $posComment " \n " ] 0 ]
455455 $w .f.tl insert end " $firstLine \n " [ list bluefg tagtooltip_poscomment ]
456- ::utils::tooltip::Set $w .f.tl -tag tagtooltip_poscomment -- $posComment
456+ ::utils::tooltip::Set $w .f.tl -tag tagtooltip_poscomment $posComment
457457 $w .f.tl tag bind tagtooltip_poscomment <Double-Button-1> " ::tree::mask::addComment"
458458 }
459459 }
@@ -521,7 +521,7 @@ proc ::tree::displayLines { baseNumber moves } {
521521 if {$comment != " " } {
522522 set firstLine [ lindex [split $comment " \n " ] 0 ]
523523 $w .f.tl insert end " $firstLine " tagtooltip$i
524- ::utils::tooltip::Set $w .f.tl -tag tagtooltip$i -- $comment
524+ ::utils::tooltip::Set $w .f.tl -tag tagtooltip$i $comment
525525 $w .f.tl tag bind tagtooltip$i <Double-Button-1> " ::tree::mask::addComment $move "
526526 }
527527 }
@@ -578,9 +578,13 @@ proc ::tree::displayLines { baseNumber moves } {
578578 $w .f.tl insert end " [ ::trans [lindex $m 0] ]" bluefg
579579 # comment
580580 set comment [lindex $m 3]
581- set firstLine [ lindex [split $comment " \n " ] 0 ]
582- $w .f.tl insert end " $firstLine \n " tagtooltip$idx
583- ::utils::tooltip::Set $w .f.tl -tag tagtooltip$idx -- $comment
581+ if {$comment != " " } {
582+ set firstLine [ lindex [split $comment " \n " ] 0 ]
583+ $w .f.tl insert end " $firstLine " tagtooltip$idx
584+ ::utils::tooltip::Set $w .f.tl -tag tagtooltip$idx $comment
585+ $w .f.tl tag bind tagtooltip$idx <Double-Button-1> " ::tree::mask::addComment [ lindex $m 0] "
586+ }
587+ $w .f.tl insert end " \n "
584588
585589 # Bind right button to popup a contextual menu:
586590 $w .f.tl tag bind tagclick$idx <ButtonPress-$::MB3 > " ::tree::mask::contextMenu $w .f.tl [ lindex $m 0] %x %y %X %Y ; break"
0 commit comments