--- a/Tools__MethodList.st Sun Oct 15 23:56:50 2017 +0100
+++ b/Tools__MethodList.st Mon Oct 16 08:24:58 2017 +0100
@@ -498,6 +498,22 @@
(something == #methodTrap) ifTrue:[
newMethod isWrapped ifTrue:[
oldMethod := newMethod originalMethod.
+ "/ We have to handle the case the method was wrapped before
+ "/ and now is wrapped differently - for example there was be breakpoint
+ "/ changed to trace point.
+ "/
+ "/ In that case, the oldMethod (the one that is in the selection and the one
+ "/ that WAS installed in the class is not `newMethod originalMethod` but it's the
+ "/ method whose originalMethod is the same as `newMethod originalMethod`.
+ "/
+ "/ Since we're interested in this case if such method is selected, checn the selection.
+ "/ A little tricky, we'll see.
+ "/
+ "/ See https://swing.fit.cvut.cz/projects/ticket/103
+ "/
+ selection notEmpty ifTrue:[
+ oldMethod := selection detect:[:each | each isWrapped and:[each originalMethod == oldMethod"newMethod originalMethod"]] ifNone:oldMethod.
+ ]
] ifFalse:[
selection notEmpty ifTrue:[
oldMethod := selection detect:[:each | each isWrapped and:[each originalMethod == newMethod]] ifNone:nil.
@@ -730,7 +746,7 @@
"Created: / 05-02-2000 / 13:42:14 / cg"
"Modified: / 05-06-2012 / 23:47:15 / cg"
- "Modified: / 15-10-2017 / 23:49:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-10-2017 / 00:05:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
selectedMethodsChanged