Fix for bug #12: In-place search in class category list is broken
Caused by use of visualBlock and selectedVisualBlock by ClassCategoryList.
Fixed by temporarily setting visual blocks to nil during in-place. The only drawback is that categories
are not colorized during in-place search. This would require deeper refactoring of
ClassCategoryList not to use visual blocks or having special search handler for
that list.
--- a/Tools__BrowserList.st Wed Mar 26 10:40:06 2014 +0100
+++ b/Tools__BrowserList.st Wed Mar 26 11:00:25 2014 +0100
@@ -28,7 +28,8 @@
!
Object subclass:#SearchHandler
- instanceVariableNames:'listView listHolder listSelectionHolder searchField searchWindow
+ instanceVariableNames:'listView listViewVisualBlock listViewSelectedVisualBlock
+ listHolder listSelectionHolder searchField searchWindow
searchHolder'
classVariableNames:''
poolDictionaries:''
@@ -1793,6 +1794,14 @@
"Created: / 27-07-2011 / 22:14:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+restoreListViewProperties
+
+ listView visualBlock: listViewVisualBlock.
+ listView selectedVisualBlock: listViewSelectedVisualBlock.
+
+ "Created: / 26-03-2014 / 09:50:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
saveList
listHolder := listView listHolder.
@@ -1801,6 +1810,17 @@
"Created: / 27-07-2011 / 22:14:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+saveListViewProperties
+
+ listViewVisualBlock := listView visualBlock.
+ listViewSelectedVisualBlock := listView selectedVisualBlock.
+
+ listView visualBlock: nil.
+ listView selectedVisualBlock: nil.
+
+ "Created: / 26-03-2014 / 09:50:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
showSearchWindow
searchWindow := StandardSystemView new
@@ -1826,19 +1846,23 @@
startSearch
+ self saveListViewProperties.
self saveList.
self updateList.
self showSearchWindow.
"Created: / 27-07-2011 / 21:37:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 26-03-2014 / 09:50:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
stopSearch
self hideSearchWindow.
+ self restoreListViewProperties.
self restoreList.
"Created: / 27-07-2011 / 21:37:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 26-03-2014 / 09:50:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
updateList
@@ -1905,10 +1929,10 @@
!BrowserList class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__BrowserList.st,v 1.64 2014-03-05 10:39:09 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__BrowserList.st,v 1.65 2014-03-26 10:00:25 vrany Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__BrowserList.st,v 1.64 2014-03-05 10:39:09 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__BrowserList.st,v 1.65 2014-03-26 10:00:25 vrany Exp $'
! !