Skip to content

Commit

Permalink
fix Issue #242: preserve current button bar state (i.e., if class is …
Browse files Browse the repository at this point in the history
…selected, show class-side protocol when switching classes)
  • Loading branch information
dalehenrich committed Mar 15, 2016
1 parent 51d5c7c commit d8b6f4c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
@@ -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 ] ]
Expand Up @@ -3,13 +3,13 @@
},
"instance" : {
"activateModel:" : "dkh 8/19/2015 10:08",
"buildButtonBarMorph" : "dkh 8/31/2015 08:23",
"buildButtonBarMorph" : "dkh 3/14/2016 17:09",
"buildOverflowMorph" : "dkh 8/19/2015 15:52",
"buttonBarMorph" : "dkh 8/19/2015 15:36",
"buttonBarState" : "dkh 8/31/2015 08:13",
"buttonBarState:" : "dkh 8/31/2015 12:50",
"clientElement:" : "dkh 8/31/2015 13:00",
"buttonBarState:" : "dkh 3/14/2016 17:09",
"clientElement:" : "dkh 3/14/2016 17:08",
"morph" : "dkh 8/19/2015 15:14",
"switchAction:" : "dkh 8/31/2015 08:25",
"switchSpecs" : "dkh 8/31/2015 13:09",
"switchState:" : "dkh 8/31/2015 08:14" } }
"switchState:" : "dkh 3/14/2016 16:58" } }

Large diffs are not rendered by default.

Expand Up @@ -42,9 +42,9 @@ itemSelected: listElement at: index shiftPressed: shiftPressed
stonArray := {#'editStonElement:'.
classDefClientElement.
#'editStonElement:'.
buttonBarClientElement.
classProtocolClientElement.
#'editStonElement:'.
classProtocolClientElement}.
buttonBarClientElement}.
(theWindowName ~~ #'hierarchy' or: [ selectedClass ~~ classDef theClass ])
ifTrue: [
| hierarchyClientElement |
Expand Down
Expand Up @@ -2,4 +2,4 @@
"class" : {
},
"instance" : {
"itemSelected:at:shiftPressed:" : "dkh 08/31/2015 08:10" } }
"itemSelected:at:shiftPressed:" : "dkh 03/14/2016 16:56" } }

Large diffs are not rendered by default.

0 comments on commit d8b6f4c

Please sign in to comment.