Hi,
The reason that animations don't work with the board flipped is due to
the resize2 procedure in board.tcl. Its comment mentions "incoherent
state" if the board is resized while flipped, so in this case it
un-flips the board, calls the normal resize procedure, and then re-flips
the board. This has the unfortunate side effect of canceling the
animation. I don't know if the "incoherent state" still applies, but
the attached patch assumes that it does.
For animations, the board size isn't changing, This means means that
the normal resize procedure will exit early since nothing needs to be
done. In this case there doesn't seem to be much need to un-flip and
re-flip the board either. The patch adds a check in resize2 to see if
the size is changing when the board is currently flipped and skips the
entire un-flip, resize, re-flip process if the size isn't changing.
This keeps the animation from being canceled.
This should address Bug 3028020. To me it's definitely more appealing to
see the piece move smoothly instead of suddenly jumping to the
destination square.
Cheers,
Larry Isaacs
diff --git tcl/board.tcl tcl/board.tcl
index 0e572f2..4737a43 100644
--- tcl/board.tcl
+++ tcl/board.tcl
@@ -1209,9 +1209,12 @@
if { ! [ ::board::isFlipped $w ] } {
::board::resize $w $psize
} else {
- ::board::flip $w
- ::board::resize $w $psize
- ::board::flip $w
+ set oldsize $::board::_size($w)
+ if {$psize != $oldsize} {
+ ::board::flip $w
+ ::board::resize $w $psize
+ ::board::flip $w
+ }
}
}
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Scid-users mailing list
Scid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scid-users