Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Issue #242: preserve current button bar state (i.e., if class is …
…selected, show class-side protocol when switching classes)
- Loading branch information
1 parent
51d5c7c
commit d8b6f4c
Showing
6 changed files
with
21 additions
and
10 deletions.
There are no files selected for viewing
13 changes: 12 additions & 1 deletion
13
repository/Topez-Pharo-Common.package/TodeButtonBarEditor.class/instance/clientElement..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,5 +1,16 @@ | ||
accessing | ||
clientElement: aTDClientElement | ||
| oldState | | ||
super clientElement: aTDClientElement. | ||
oldState := buttonBarState. | ||
buttonBarState := nil. | ||
self buildButtonBarMorph | ||
self buildButtonBarMorph. | ||
oldState == buttonBarState | ||
ifFalse: [ | ||
| newSwitchIndex | | ||
newSwitchIndex := (self switchSpecs collect: [ :each | each at: 1 ]) indexOf: oldState. | ||
newSwitchIndex > 0 | ||
ifTrue: [ | ||
"https://github.com/dalehenrich/tode/issues/242" | ||
"prserve old switch state" | ||
self switchAction: newSwitchIndex ] ] |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.