Tools__CodeView2.st
branchjv
changeset 12224 eabcf6fc3857
parent 12221 413e98858ddc
child 12229 5c129972b1fd
--- a/Tools__CodeView2.st	Thu Apr 05 13:51:06 2012 +0100
+++ b/Tools__CodeView2.st	Thu Apr 05 18:53:51 2012 +0100
@@ -2144,6 +2144,12 @@
         self invalidate.
     ].
 
+    changedObject == codeView currentBlockNodeHolder ifTrue:[
+         self invalidate.
+         ^ self.
+    ].
+
+
     "/ changedObject == someOfMyValueHolders ifTrue:[
     "/     self doSomethingApropriate.
     "/     ^ self.
@@ -2151,7 +2157,7 @@
     super update:something with:aParameter from:changedObject
 
     "Modified (format): / 15-07-2011 / 20:14:04 / cg"
-    "Modified: / 07-10-2011 / 19:25:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 05-04-2012 / 17:47:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !CodeView2::GutterView methodsFor:'event handling'!
@@ -2214,6 +2220,8 @@
     codeView := aCodeView2.
     codeView addDependent: self.
     codeView reallyModifiedChannel addDependent: self.
+    codeView currentBlockNodeHolder addDependent: self.
+
     textView := aCodeView2 textView.
     textView addDependent: self.
     self currentBlockNodeHolder: codeView currentBlockNodeHolder.
@@ -2223,7 +2231,7 @@
 
     "Created: / 14-02-2010 / 15:19:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 17-08-2011 / 15:15:55 / cg"
-    "Modified: / 16-02-2012 / 23:11:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 05-04-2012 / 17:46:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !CodeView2::GutterView methodsFor:'queries'!
@@ -2332,7 +2340,7 @@
 redrawLine:line cleared: cleared
     "redraws specified line. Returns width of drawn object. Color of drawn objects should be taken from lineFont, lineColor"
     
-    |lineString y0 textW requiredW oldFont newFont oldColor newColor|
+    |lineString y0 yOfLine textW requiredW oldFont newFont oldColor newColor|
 
     lineString := self displayedString:line.
     textW := (lineString widthOn:self).
@@ -2344,7 +2352,7 @@
     newFont isNil ifTrue:[ 
         newFont := oldFont.
         newColor := self lineColor:line.
-        newColor ifNotNil:[ self paint:newColor ].
+        newColor notNil ifTrue:[ self paint:newColor ].
     ] ifFalse:[
         self font:newFont. 
     ].
@@ -2353,7 +2361,7 @@
         self font:newFont
     ].
 
-    y0 := (textView yOfLine:line) 
+    y0 := (yOfLine := textView yOfLine:line) 
           + (textView font ascentOn:device)
           - (newFont descentOn:device).
 
@@ -2366,22 +2374,25 @@
         drawLine:line in: self 
         atX: self paddingLeft + (widthAcceptCancel ? 0) y:y0 width: widthAnnotations height: font height
         from:nil to:nil with:self paint and: self backgroundColor.
-
     self 
         displayString:lineString
         x:(self width - textW - self paddingRight - widthDiffInfo)
         y:y0.
-    newFont 
-        ifNotNil:[
-            self font:oldFont.
-            self paint:oldColor
-        ]
-        ifNil:[ newColor ifNotNil:[ self paint:oldColor ]. ].
+    newFont notNil ifTrue:[
+        self font:oldFont.
+        self paint:oldColor
+    ] ifFalse:[ 
+        newColor notNil ifTrue:[ 
+            self paint:oldColor 
+        ]. 
+    ].
+
     ^ requiredW.
 
     "Modified: / 14-12-2009 / 15:30:44 / Jindra <a>"
     "Created: / 17-06-2011 / 14:11:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 16-03-2012 / 11:16:27 / cg"
+    "Modified: / 05-04-2012 / 17:58:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 redrawLinesFrom:start
@@ -3376,7 +3387,7 @@
 !CodeView2 class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Tools__CodeView2.st 7969 2012-04-04 16:35:25Z vranyj1 $'
+    ^ '$Id: Tools__CodeView2.st 7972 2012-04-05 17:53:51Z vranyj1 $'
 !
 
 version_CVS
@@ -3384,7 +3395,7 @@
 !
 
 version_SVN
-    ^ '$Id: Tools__CodeView2.st 7969 2012-04-04 16:35:25Z vranyj1 $'
+    ^ '$Id: Tools__CodeView2.st 7972 2012-04-05 17:53:51Z vranyj1 $'
 ! !
 
 CodeView2 initialize!