--- a/Tools__ChangeList.st Thu May 17 16:29:24 2012 +0100
+++ b/Tools__ChangeList.st Fri May 18 00:13:53 2012 +0100
@@ -899,9 +899,14 @@
!
updateList
- |inGenerator changeset newList |
+ |inGenerator changeset firstLineShown oldSel newList newSel |
inGenerator := self inGeneratorHolder value.
+ listView notNil ifTrue:[
+ firstLineShown := listView yVisibleToLineNr:1.
+ ].
+ oldSel := self selection.
+
changeset := inGenerator ifNil:[ #() ] ifNotNil:[ inGenerator ].
newList := changeset
select:
@@ -915,13 +920,24 @@
self listHolder value: newList.
((newList size ~~ 0) and:[scrollToBottom]) ifTrue:[
self selection: { newList last }
+ ] ifFalse:[
+ oldSel notEmptyOrNil ifTrue:[
+ newSel := oldSel species new: oldSel size.
+ oldSel := oldSel reject:[:e|e isNil].
+ oldSel := oldSel collect:[:e|e change].
+ newList do:[:e|(oldSel includes:e change) ifTrue:[newSel add:e]].
+ self selection: newSel.
+ ].
+ (listView notNil and:[firstLineShown notNil]) ifTrue:[
+ listView scrollToLine: (newList size min: firstLineShown).
+ ].
].
scrollToBottom := false.
]
"Modified: / 28-12-2011 / 15:46:15 / cg"
- "Modified: / 30-03-2012 / 17:04:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-05-2012 / 23:27:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeList methodsFor:'queries'!
@@ -1127,7 +1143,7 @@
| list cx icon colW colS |
list := self application.
cx := x := newX.
- list allowRemoveHolder value ifTrue:
+ (list allowRemoveHolder value and:[list showRemovedHolder value]) ifTrue:
[(icon := self iconRemoved) ifNotNil:
[icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) ].
cx := cx + 22."experimental value - this looks good"].
@@ -1150,7 +1166,7 @@
super displayLabel:colS h:lH on:aGC x: (aGC width - 5 - colW) y:y h:h.
].
- "Modified: / 03-04-2012 / 17:23:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-05-2012 / 23:05:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeList::ListEntry methodsFor:'private'!
@@ -1180,7 +1196,7 @@
!ChangeList class methodsFor:'documentation'!
version
- ^ '$Id: Tools__ChangeList.st 7964 2012-04-03 17:37:50Z vranyj1 $'
+ ^ '$Id: Tools__ChangeList.st 7999 2012-05-17 23:13:53Z vranyj1 $'
!
version_CVS
@@ -1188,5 +1204,5 @@
!
version_SVN
- ^ '$Id: Tools__ChangeList.st 7964 2012-04-03 17:37:50Z vranyj1 $'
+ ^ '$Id: Tools__ChangeList.st 7999 2012-05-17 23:13:53Z vranyj1 $'
! !