daboide Commit
Revision 325
Date: 2006-01-11 21:57:46 -0800 (Wed, 11 Jan 2006)
Author: paul

Changed:
U   trunk/DesignerPropSheet.py

Log:
Improved performance of the property grid by only setting the DataSet if it has 
actually changed. Also, the explicit call to fillGrid() isn't necessary because 
dGrid._setDataSet() already calls it.

Diff:
Modified: trunk/DesignerPropSheet.py
===================================================================
--- trunk/DesignerPropSheet.py  2006-01-12 02:29:35 UTC (rev 324)
+++ trunk/DesignerPropSheet.py  2006-01-12 05:57:46 UTC (rev 325)
@@ -94,11 +94,11 @@
                pg = self.propGrid
                pg.propDict = propDict
                ds = self.dataSetFromPropDict(propDict)
-               pg.DataSet = ds
-               pg.Enabled = (len(ds) > 0)
-               pg.fillGrid(force=True)
+               if ds != pg.DataSet:
+                       # The dataset has changed, so update the grid:
+                       pg.DataSet = ds
+                       pg.Enabled = (len(ds) > 0)
                
-               
        def dataSetFromPropDict(self, propDict):
                props = propDict.keys()
                props.sort()




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to