Skip to content

Commit

Permalink
delete timeline and activete buttons when the morph is deleted (needs…
Browse files Browse the repository at this point in the history
… refactoring)
  • Loading branch information
Ol-Ba committed Jul 12, 2022
1 parent 2ab4ef0 commit 4efe708
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
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"




Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
accessing
selectedTreeNode: aNode
selectedTreeNode := aNode.

aNode canRenderUI
ifTrue: [
(aNode isActivated)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"buildMainWindowWith:" : "SG 5/21/2022 14:11",
"buildPlayButtonWith:" : "FH 8/1/2021 18:39",
"buildPositionUIPanelWith:" : "FH 8/1/2021 18:39",
"buildPropertiesTreeWith:" : "FH 8/1/2021 18:42",
"buildPropertiesTreeWith:" : "ob 7/12/2022 18:57",
"buildResetButtonWith:" : "FH 8/1/2021 18:43",
"buildSaveButtonWith:" : "FH 8/1/2021 18:44",
"buildTimeline:" : "FH 8/1/2021 18:44",
Expand All @@ -36,7 +36,7 @@
"createTextPropertyOn:" : "LW 7/26/2021 16:44",
"defaultEmptyPanels" : "DM 8/7/2020 17:37",
"defaultPropertyPanelPosition" : "mjs 7/31/2021 16:18",
"deleteMorph" : "ob 7/12/2022 18:45",
"deleteMorph" : "ob 7/12/2022 20:48",
"editorTitle" : "LH 8/4/2020 10:31",
"editorTitle:" : "DM 8/3/2020 15:40",
"emptyPanels" : "DM 8/7/2020 17:37",
Expand Down Expand Up @@ -76,7 +76,7 @@
"seedProperties" : "Noel Bastubbe 6/22/2022 11:27",
"selectMorphByHand" : "FH 8/1/2021 18:49",
"selectedTreeNode" : "JIZ 5/27/2020 15:31",
"selectedTreeNode:" : "ob 6/26/2022 19:02",
"selectedTreeNode:" : "ob 7/12/2022 19:48",
"switchTimelineToMorphWith:" : "FH 8/1/2021 18:49",
"timeline" : "FH 8/1/2021 18:27",
"timeline:" : "FH 8/1/2021 18:27",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"createCompositeAnimationWith:withKey:withPreviousKey:" : "FH 8/1/2021 19:10",
"currentValue" : "MH 7/8/2021 11:08",
"currentValue:" : "MH 7/8/2021 11:08",
"deactivateProperty" : "ob 6/26/2022 17:01",
"deactivateProperty" : "ob 7/12/2022 18:51",
"defaultFrame" : "MH 7/8/2021 11:33",
"defaultValue" : "MH 7/8/2021 11:33",
"deleteAllKeyframes" : "ob 6/26/2022 18:58",
Expand Down

0 comments on commit 4efe708

Please sign in to comment.