Fix enter/exit analyze mode in the middle of a multi-move
[vchess.git] / client / src / components / BaseGame.vue
index 3d8e7eb..7424aa4 100644 (file)
@@ -258,8 +258,11 @@ export default {
       else this.lastMove = null;
     },
     toggleAnalyze: function() {
+      // Autoplay has priority:
+      if (this.autoplay) return;
       if (this.mode != "analyze") {
         // Enter analyze mode:
+        if (this.inMultimove) this.cancelCurrentMultimove();
         this.gameMode = this.mode; //was not 'analyze'
         this.mode = "analyze";
         this.gameCursor = this.cursor;