Skip to content

Commit

Permalink
include preparedToBeSaved override that cleares the stylecontext. ref #…
Browse files Browse the repository at this point in the history
…52. WARNING:

this may break saving for your Pheno widgets. If you do notice any odd behavior, please report a bug and we will either revert this change or find the correct fix (which would likely involve reconstructing the consistent state after being restored from a refstream)
  • Loading branch information
tom95 committed Jun 22, 2018
1 parent 6b05bdd commit b01be4c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*Pheno-Styles
prepareToBeSaved
"Prepare this morph to be saved to disk. Subclasses should nil out any instance variables that holds state that should not be saved, such as cached Forms. Note that this operation may take more drastic measures than releaseCachedState; for example, it might discard the transcript of an interactive chat session."

self releaseCachedState.
self formerOwner: nil.
self formerPosition: nil.
self removeProperty: #undoGrabCommand.
fullBounds := nil
self removeProperty: #styleContext
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"assureWidgetParent" : "TB 4/4/2018 11:58",
"convertPaddingToRectangle:" : "TB 4/20/2018 10:50",
"isWidget" : "TB 4/6/2018 13:53",
"prepareToBeSaved" : "TB 6/22/2018 22:31",
"removeStyleClass:" : "TB 4/4/2018 14:32",
"resetStyleState" : "TB 4/4/2018 11:49",
"styleClasses" : "TB 4/4/2018 11:49",
Expand Down

0 comments on commit b01be4c

Please sign in to comment.