-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
delete timeline and activete buttons when the morph is deleted (needs…
… refactoring)
- Loading branch information
Showing
4 changed files
with
19 additions
and
7 deletions.
There are no files selected for viewing
17 changes: 14 additions & 3 deletions
17
packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/deleteMorph.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
messaging | ||
deleteMorph | ||
|
||
self selectedTreeNode ifNil: [^ 'break']. | ||
self propertyList copy do: [:each | self selectedTreeNode targetMorph = each targetMorph ifTrue: [each targetMorph extent: 0@0. each targetMorph abandon. self propertyList remove: each]]. | ||
"NEEDS REFACTORING" | ||
self selectedTreeNode ifNil: [^ 'break']. | ||
"check if the morph is open in world than you can delete the worph from the world" | ||
self selectedTreeNode targetMorph isInWorld ifTrue: [ | ||
self propertyList copy do: [:each | | ||
|
||
|
||
(self selectedTreeNode targetMorph = each targetMorph or: (self selectedTreeNode targetMorph hasSubmorphs ifTrue: [self selectedTreeNode targetMorph submorphs first = each targetMorph])) "checks if selected tree node or it's child (because it can be a transformation morph that has target morph a child) the same as the one of the morphs in the property list" | ||
ifTrue: [self selectedTreeNode targetMorph removeFlexShell. self propertyList remove: each. each targetMorph abandon. ].].]. | ||
|
||
|
||
self propertyTreeMorph update: self propertyTreeMorph getChildrenSelector. | ||
|
||
self propertyEditorPanel submorphs do: [:each| each abandon]. "clear property editor panel" | ||
self timeline submorphs do: [:each| each abandon]. "leaves the background and scroll panel from timeline. Fiqure out how to delete it" | ||
|
||
|
||
|
||
|
1 change: 1 addition & 0 deletions
1
packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/selectedTreeNode..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
accessing | ||
selectedTreeNode: aNode | ||
selectedTreeNode := aNode. | ||
|
||
aNode canRenderUI | ||
ifTrue: [ | ||
(aNode isActivated) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters