Skip to content

Commit

Permalink
Improvement: Save materials from project (#1984)
Browse files Browse the repository at this point in the history
  • Loading branch information
parachvte authored Feb 21, 2023
1 parent c567073 commit 2e0c179
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/flux/project/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
LOAD_MODEL_FROM_OUTER,
MAX_RECENT_FILES_LENGTH,
PAGE_EDITOR,
PRINTING_MANAGER_TYPE_MATERIAL,
PROCESS_MODE_MESH,
RIGHT_EXTRUDER,
SOURCE_TYPE
Expand Down Expand Up @@ -333,6 +334,10 @@ export const actions = {

const { supportExtruderConfig } = restState;
dispatch(modActions.updateSupportExtruderConfig(supportExtruderConfig));

const { defaultMaterialId, defaultMaterialIdRight } = envObj;
dispatch(modActions.updateSavedPresetIds(PRINTING_MANAGER_TYPE_MATERIAL, defaultMaterialId, LEFT_EXTRUDER));
dispatch(modActions.updateSavedPresetIds(PRINTING_MANAGER_TYPE_MATERIAL, defaultMaterialIdRight, RIGHT_EXTRUDER));
} else {
dispatch(modActions.updateState(envHeadType, restState));
}
Expand Down

0 comments on commit 2e0c179

Please sign in to comment.