Skip to content

Commit a29d950

Browse files
committed
fix(GridMapWidget): clear selection on grid change
Avoids an item from the previous grid being placed on the current grid.
1 parent 3c9c87d commit a29d950

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/widgets/GridMapWidget.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ export default class GridMapWidget extends React.Component {
9595
this.gridMap.setSymmetry(this.props.state.symmetry);
9696
this.gridMap.setReplacementMode(this.props.state.replacementMode);
9797
this.gridMap.setGridSize(this.props.gridSize);
98+
// avoid keeping a selected item from another map.
99+
this.state.selected = null;
98100
this.pushChanges();
99101
}
100102
}

0 commit comments

Comments
 (0)