Browse Source

Helios: Fixes inspector refresh

Nicolas Petton 10 years ago
parent
commit
b5b5710f0b
2 changed files with 8 additions and 9 deletions
  1. 4 5
      src/Helios-Inspector.js
  2. 4 4
      src/Helios-Inspector.st

+ 4 - 5
src/Helios-Inspector.js

@@ -1226,15 +1226,14 @@ var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=_st(self._inspectee()).__eq(anObject);
-if(smalltalk.assert($1)){
-return self;
+if(! smalltalk.assert($1)){
+self._setTabLabel_(_st(anObject)._printString());
 };
 globals.HLInspector.superclass.fn.prototype._inspect_.apply(_st(self), [anObject]);
-self._setTabLabel_(_st(anObject)._printString());
 return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.HLInspector)})},
 args: ["anObject"],
-source: "inspect: anObject\x0a\x09\x22Avoid refreshing the tabs if the inspectee didn't change\x22\x0a\x09self inspectee = anObject ifTrue: [ ^ self ].\x0a\x09\x0a\x09super inspect: anObject.\x0a\x09self setTabLabel: anObject printString",
-messageSends: ["ifTrue:", "=", "inspectee", "inspect:", "setTabLabel:", "printString"],
+source: "inspect: anObject\x0a\x09\x22Avoid refreshing the tabs if the inspectee didn't change\x22\x0a\x09self inspectee = anObject ifFalse: [\x0a\x09\x09self setTabLabel: anObject printString ].\x0a\x09\x09\x0a\x09super inspect: anObject",
+messageSends: ["ifFalse:", "=", "inspectee", "setTabLabel:", "printString", "inspect:"],
 referencedClasses: []
 }),
 globals.HLInspector);

+ 4 - 4
src/Helios-Inspector.st

@@ -379,10 +379,10 @@ HLInspectorWidget subclass: #HLInspector
 
 inspect: anObject
 	"Avoid refreshing the tabs if the inspectee didn't change"
-	self inspectee = anObject ifTrue: [ ^ self ].
-	
-	super inspect: anObject.
-	self setTabLabel: anObject printString
+	self inspectee = anObject ifFalse: [
+		self setTabLabel: anObject printString ].
+		
+	super inspect: anObject
 ! !
 
 !HLInspector methodsFor: 'rendering'!