Tools__MethodList.st
changeset 14875 fdaf043c900b
parent 14847 a69476d48e3d
child 14958 7012d57bddc6
--- a/Tools__MethodList.st	Thu Nov 20 15:49:04 2014 +0100
+++ b/Tools__MethodList.st	Thu Nov 20 15:49:41 2014 +0100
@@ -786,7 +786,7 @@
 !
 
 update:something with:aParameter from:changedObject
-    |cls clsName sel mthd mustFlushInheritanceInfo|
+    |cls clsName sel mthd mustFlushInheritanceInfo methodIsShown|
 
     mustFlushInheritanceInfo := true.
 
@@ -833,28 +833,37 @@
         (something == #methodTrap
         or:[ something == #methodPrivacy
         or:[ something == #lastTestRunResult] ]) ifTrue:[
+            cls := aParameter at:1.
+            (classes includesIdentical:cls) ifFalse:[ ^ self].
+
+            methodIsShown := false.
+            sel := aParameter at:2.
+            mthd := cls compiledMethodAt:sel.
+            (mthd notNil and:[mthd isWrapped or:[mthd isMethodWithBreakpoints]]) ifTrue:[
+                |original|
+
+                original := mthd originalMethod.
+                (methodList includesIdentical:original) ifTrue:[
+                    methodIsShown := true.
+                    methodList replaceAll:original with:mthd.
+                    lastSelectedMethods notNil ifTrue:[
+                        lastSelectedMethods replaceAll:original with:mthd.
+                    ].
+                ]
+            ] ifFalse:[
+                methodIsShown := (methodList includesIdentical:mthd).
+            ].
+            methodIsShown ifFalse:[^ self].
+
             self window shown ifFalse:[
                 "JV@2011-11-17: Do not break the dependency here,
                  because then the window won't get updates once
                  deiconified -> leads to confusing behavior
                  (browser shows obsolete info)"
                 "/changedObject removeDependent:self. "/ ?????
-                self invalidateList.
+                listValid ifTrue:[ self invalidateList ].
                 ^ self
             ].
-            cls := aParameter at:1.
-            (classes includesIdentical:cls) ifFalse:[ ^ self].
-
-            sel := aParameter at:2.
-            mthd := cls compiledMethodAt:sel.
-            (mthd notNil and:[mthd isWrapped or:[mthd isMethodWithBreakpoints]]) ifTrue:[
-                (methodList includes:mthd originalMethod) ifTrue:[
-                    methodList replaceAll:mthd originalMethod with:mthd.
-                    lastSelectedMethods notNil ifTrue:[
-                        lastSelectedMethods replaceAll:mthd originalMethod with:mthd.
-                    ].
-                ]
-            ].
             mustFlushInheritanceInfo := false.
         ].
         something == #newClass ifTrue:[
@@ -1897,10 +1906,10 @@
 !MethodList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodList.st,v 1.107 2014-11-19 17:54:00 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodList.st,v 1.108 2014-11-20 14:49:41 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodList.st,v 1.107 2014-11-19 17:54:00 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodList.st,v 1.108 2014-11-20 14:49:41 cg Exp $'
 ! !