-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include preparedToBeSaved override that cleares the stylecontext. ref #…
…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
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
src/Pheno-Styles.package/Morph.extension/instance/prepareToBeSaved.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 |
---|---|---|
@@ -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 |
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