File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
client/src/components/Import Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -41,10 +41,9 @@ export default function Import() {
4141 // If an object is saved, the position of the imported object is set to the center of the saved object
4242 let firstPosition = Object . keys ( positionVector ) . length !== 0 ? positionVector : null ;
4343
44+ let modified = isModified ;
4445 for ( var i = 0 ; i < files . length ; i ++ ) {
4546 if ( files [ i ] . name . split ( "." ) . pop ( ) === "stl" ) {
46- let modified = modified ? ! modified : isModified ;
47-
4847 const contents = await loadFile ( files [ i ] ) ;
4948 const mesh = createMeshFromFile ( files [ i ] . name , contents ) ;
5049
@@ -56,7 +55,8 @@ export default function Import() {
5655 }
5756
5857 addPositionToMesh ( mesh , position ? position : firstPosition ) ;
59- dispatch ( setSceneModified ( ! modified ) ) ;
58+ modified = ! modified ;
59+ dispatch ( setSceneModified ( modified ) ) ;
6060 } else {
6161 setError ( true ) ;
6262 }
You can’t perform that action at this time.
0 commit comments