From 8d107bd0a24fed7f553170816079fec0bcd21beb Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Fri, 3 Jul 2020 11:50:58 +0200 Subject: Ensure construction is ended when topology is changed --- frontend/src/reducers/construction-mode.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'frontend/src/reducers/construction-mode.js') diff --git a/frontend/src/reducers/construction-mode.js b/frontend/src/reducers/construction-mode.js index ac281667..fb33da72 100644 --- a/frontend/src/reducers/construction-mode.js +++ b/frontend/src/reducers/construction-mode.js @@ -4,7 +4,7 @@ import { GO_DOWN_ONE_INTERACTION_LEVEL } from '../actions/interaction-level' import { CANCEL_NEW_ROOM_CONSTRUCTION_SUCCEEDED, FINISH_NEW_ROOM_CONSTRUCTION, - FINISH_ROOM_EDIT, + FINISH_ROOM_EDIT, SET_CURRENT_TOPOLOGY, START_NEW_ROOM_CONSTRUCTION_SUCCEEDED, START_ROOM_EDIT, } from '../actions/topology/building' @@ -20,6 +20,7 @@ export function currentRoomInConstruction(state = '-1', action) { case FINISH_NEW_ROOM_CONSTRUCTION: case OPEN_EXPERIMENT_SUCCEEDED: case FINISH_ROOM_EDIT: + case SET_CURRENT_TOPOLOGY: case DELETE_ROOM: return '-1' default: @@ -33,6 +34,7 @@ export function inRackConstructionMode(state = false, action) { return true case STOP_RACK_CONSTRUCTION: case OPEN_EXPERIMENT_SUCCEEDED: + case SET_CURRENT_TOPOLOGY: case GO_DOWN_ONE_INTERACTION_LEVEL: return false default: -- cgit v1.2.3