From a76fc180fa8cb4f075463fac6809f3ee5a5c11c9 Mon Sep 17 00:00:00 2001 From: Yichuan Shen Date: Fri, 24 May 2019 22:47:29 +0800 Subject: [PATCH] Fix #580 --- CHANGELOG.md | 10 ++++++++++ src/components/DrawerManager.js | 7 ++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dbb36398..6696f9611 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. +## [Unreleased][unreleased] + +**Changed** + +* Board transformations (rotation/flip/inversion) are now temporary and faster, transforms coordinates as well, located in the 'View' main menu, and have dedicated keyboard shortcuts + +**Fixed** + +* Fix 'Update Result' not working in the score drawer + ## [Sabaki v0.43.3][v0.43.3] (2019-05-13) **Added** diff --git a/src/components/DrawerManager.js b/src/components/DrawerManager.js index 0d5016bc4..6e4ea2ece 100644 --- a/src/components/DrawerManager.js +++ b/src/components/DrawerManager.js @@ -13,7 +13,12 @@ class DrawerManager extends Component { super() this.handleScoreSubmit = ({resultString}) => { - this.props.rootTree.nodes[0].RE = [resultString] + let gameTree = this.props.gameTrees[this.props.gameIndex] + let newTree = gameTree.mutate(draft => { + draft.updateProperty(draft.root.id, 'RE', [resultString]) + }) + + sabaki.setCurrentTreePosition(newTree, this.props.treePosition) sabaki.closeDrawer() setTimeout(() => sabaki.setMode('play'), 500) }