Revision: 3887
          http://vexi.svn.sourceforge.net/vexi/?rev=3887&view=rev
Author:   clrg
Date:     2010-08-27 02:48:10 +0000 (Fri, 27 Aug 2010)

Log Message:
-----------
Reduce repeat callFetchData calls (fixed)

Modified Paths:
--------------
    trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/table.t

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/table.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/table.t      
2010-08-27 00:54:06 UTC (rev 3886)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/table.t      
2010-08-27 02:48:10 UTC (rev 3887)
@@ -248,9 +248,10 @@
         thisbox.forceFetchData = function(v) { callFetchData(true); return; }
         
         /** applied to properties likely to affect visible rows */
+        var callrequired = true;
         var trapToFetchData = function(v) {
             cascade = v;
-            if (v!=trapee[trapname]) {
+            if (callrequired and v!=trapee[trapname]) {
                 callFetchData();
             }
         }
@@ -347,11 +348,13 @@
             }
             numrows = v;
             cascade = v;
+            callrequired = false;
             th_body.rowcount = v;
             th_bodyview.height = rowheight * v;
-            // fetch view contents
+            callrequired = true;
             if (numrows > 0) {
-                callFetchData();
+                // fetch view contents
+                forceFetchData();
                 return;
             }
             // clear view contents


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to