Skip to content

Commit 0b3f5fb

Browse files
committed
removed custom canDelete to use blockly deletable
1 parent a734a67 commit 0b3f5fb

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

src/blocks/mrc_class_method_def.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export type Parameter = {
4545
type ClassMethodDefBlock = Blockly.Block & ClassMethodDefMixin & Blockly.BlockSvg;
4646
interface ClassMethodDefMixin extends ClassMethodDefMixinType {
4747
mrcCanChangeSignature: boolean,
48-
mrcCanDelete: boolean,
4948
mrcReturnType: string,
5049
mrcParameters: Parameter[],
5150
mrcPythonMethodName: string,
@@ -58,10 +57,6 @@ type ClassMethodDefExtraState = {
5857
* Can change name and parameters and return type
5958
*/
6059
canChangeSignature: boolean,
61-
/**
62-
* Can delete from class
63-
*/
64-
canDelete: boolean,
6560
/**
6661
* The return type of the function.
6762
* Use 'None' for no return value.
@@ -100,7 +95,6 @@ const CLASS_METHOD_DEF = {
10095
this: ClassMethodDefBlock): ClassMethodDefExtraState {
10196
const extraState: ClassMethodDefExtraState = {
10297
canChangeSignature: this.mrcCanChangeSignature,
103-
canDelete: this.mrcCanDelete,
10498
returnType: this.mrcReturnType,
10599
params: [],
106100
};
@@ -124,7 +118,6 @@ const CLASS_METHOD_DEF = {
124118
extraState: ClassMethodDefExtraState
125119
): void {
126120
this.mrcCanChangeSignature = extraState.canChangeSignature;
127-
this.mrcCanDelete = extraState.canDelete;
128121
this.mrcPythonMethodName = extraState.pythonMethodName ? extraState.pythonMethodName : '';
129122
this.mrcReturnType = extraState.returnType;
130123
this.mrcParameters = [];
@@ -157,7 +150,6 @@ const CLASS_METHOD_DEF = {
157150
//Case because a current bug in blockly where it won't allow passing null to Blockly.Block.setMutator makes it necessary.
158151
(this as Blockly.BlockSvg).setMutator( null );
159152
}
160-
this.setDeletable(this.mrcCanDelete);
161153
this.mrcUpdateParams();
162154
},
163155
compose: function (this: ClassMethodDefBlock, containerBlock: any) {

src/modules/opmode_start.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"deletable": false,
1111
"extraState": {
1212
"canChangeSignature": false,
13-
"canDelete": false,
1413
"returnType": "None",
1514
"params": [],
1615
"pythonMethodName": "__init__"
@@ -27,7 +26,6 @@
2726
"deletable": false,
2827
"extraState": {
2928
"canChangeSignature": false,
30-
"canDelete": false,
3129
"returnType": "None",
3230
"params": []
3331
},

0 commit comments

Comments
 (0)