Skip to content

Commit

Permalink
#532 Vector-selector view not properly restored
Browse files Browse the repository at this point in the history
  • Loading branch information
Adriána Kohanová committed Feb 8, 2021
1 parent ad5aa18 commit d33e729
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions js/reducers/tracking/dispatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { createInitAction } from './trackingActions';
import { actionType, actionObjectType, NUM_OF_SECONDS_TO_IGNORE_MERGE } from './constants';
import { VIEWS } from '../../../js/constants/constants';
import { setCurrentVector, appendToBuyList, setHideAll, setArrowUpDown } from '../selection/actions';
import { setHideAll, setArrowUpDown } from '../selection/actions';
import {
resetReducersForRestoringActions,
shouldLoadProtein,
Expand Down Expand Up @@ -94,8 +94,7 @@ import {
setIsActionsLoading,
setActionsList,
setSnapshotImageActionList,
setUndoRedoActionList,
setPast
setUndoRedoActionList
} from './actions';
import { api, METHOD } from '../../../js/utils/api';
import { base_url } from '../../components/routes/constants';
Expand Down Expand Up @@ -726,9 +725,11 @@ export const restoreAfterTargetActions = (stages, projectId) => async (dispatch,

await dispatch(restoreSitesActions(orderedActionList, summaryView));
await dispatch(loadData(orderedActionList, targetId, majorView));
await dispatch(restoreActions(orderedActionList, majorView.stage));
await dispatch(restoreMoleculesActions(orderedActionList, majorView.stage));
await dispatch(restoreRepresentationActions(orderedActionList, stages));
await dispatch(restoreProject(projectId));
dispatch(restoreCartActions(orderedActionList, majorView.stage));

dispatch(restoreSnapshotImageActions(projectId));
dispatch(restoreNglStateAction(orderedActionList, stages));
dispatch(setIsActionsRestoring(false, true));
Expand Down Expand Up @@ -808,10 +809,6 @@ const restoreNglStateAction = (orderedActionList, stages) => (dispatch, getState
}
};

const restoreActions = (orderedActionList, stage) => (dispatch, getState) => {
dispatch(restoreMoleculesActions(orderedActionList, stage));
};

const loadData = (orderedActionList, targetId, majorView) => async (dispatch, getState) => {
await dispatch(loadAllMolecules(orderedActionList, targetId, majorView.stage));
await dispatch(loadAllDatasets(orderedActionList, targetId, majorView.stage));
Expand Down Expand Up @@ -889,7 +886,6 @@ const restoreMoleculesActions = (orderedActionList, stage) => (dispatch, getStat
dispatch(selectVectorAndResetCompounds(vectorAction.object_name));
}

dispatch(restoreCartActions(moleculesAction, stage));
dispatch(restoreAllSelectionActions(orderedActionList, stage, true));
dispatch(restoreAllSelectionByTypeActions(orderedActionList, stage, true));
dispatch(setIsTrackingMoleculesRestoring(false));
Expand Down

0 comments on commit d33e729

Please sign in to comment.