Fix group element removing (#1676)
This commit is contained in:
@ -30,7 +30,6 @@ import {
|
||||
isNonDeletedElement,
|
||||
} from "../element";
|
||||
import {
|
||||
deleteSelectedElements,
|
||||
getElementsWithinSelection,
|
||||
isOverScrollBars,
|
||||
getElementAtPosition,
|
||||
@ -126,7 +125,7 @@ import { invalidateShapeForElement } from "../renderer/renderElement";
|
||||
import { unstable_batchedUpdates } from "react-dom";
|
||||
import { SceneStateCallbackRemover } from "../scene/globalScene";
|
||||
import { isLinearElement } from "../element/typeChecks";
|
||||
import { actionFinalize } from "../actions";
|
||||
import { actionFinalize, actionDeleteSelected } from "../actions";
|
||||
import {
|
||||
restoreUsernameFromLocalStorage,
|
||||
saveUsernameToLocalStorage,
|
||||
@ -593,13 +592,7 @@ class App extends React.Component<any, AppState> {
|
||||
return;
|
||||
}
|
||||
this.copyAll();
|
||||
const { elements: nextElements, appState } = deleteSelectedElements(
|
||||
globalSceneState.getElementsIncludingDeleted(),
|
||||
this.state,
|
||||
);
|
||||
globalSceneState.replaceAllElements(nextElements);
|
||||
history.resumeRecording();
|
||||
this.setState({ ...appState });
|
||||
this.actionManager.executeAction(actionDeleteSelected);
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user