Expand Up
@@ -262,6 +262,10 @@ def fillAlgorithmTree(self):
self .fillAlgorithmTreeUsingProviders ()
self .algorithmTree .sortItems (0 , Qt .AscendingOrder )
text = unicode (self .searchBox .text ())
if (text != "" ):
self .algorithmTree .expandAll ()
def fillAlgorithmTreeUsingCategories (self ):
providersToExclude = ["model" , "script" ]
Expand Down
Expand Up
@@ -312,11 +316,8 @@ def fillAlgorithmTreeUsingCategories(self):
groupItem .addChild (subgroupItem )
for alg in subgroup :
algItem = TreeAlgorithmItem (alg )
subgroupItem .addChild (algItem )
subgroupItem .setExpanded (text != "" )
groupItem .setExpanded (text != "" )
self .algorithmTree .addTopLevelItem (mainItem )
mainItem .setExpanded (text != "" )
subgroupItem .addChild (algItem )
self .algorithmTree .addTopLevelItem (mainItem )
for providerName in allAlgs .keys ():
groups = {}
Expand Down
Expand Up
@@ -399,13 +400,13 @@ class TreeAlgorithmItem(QTreeWidgetItem):
def __init__ (self , alg ):
useCategories = SextanteConfig .getSetting (SextanteConfig .USE_CATEGORIES )
QTreeWidgetItem .__init__ (self )
self .alg = alg
self .setText (0 , alg .name )
self .alg = alg
icon = alg .getIcon ()
name = alg .name
if useCategories :
icon = GeoAlgorithm .getDefaultIcon ()
group , subgroup , name = AlgorithmDecorator .getGroupsAndName (alg )
self .setIcon (0 , icon )
self .setToolTip (0 , name )
self .setText (0 , name )