dabo Commit
Revision 6953
Date: 2011-10-28 12:21:50 -0700 (Fri, 28 Oct 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6953
Changed:
U trunk/dabo/ui/uiwx/dForm.py
Log:
Make the first navigation result in immediate update, just like historic
behavior, but subsequent quick navigations will wait for the
RowNavigationDelay to expire before requerying the children and updating
the form.
I believe this satisfies all use cases of user navigating records, since
they'll get immediate updates when clicking to the next record, but when
navigating quickly they'll get quick response after the first one.
Again, you have to turn on RowNavigationDelay to see it - I suggest 250.
Diff:
Modified: trunk/dabo/ui/uiwx/dForm.py
===================================================================
--- trunk/dabo/ui/uiwx/dForm.py 2011-10-28 18:27:51 UTC (rev 6952)
+++ trunk/dabo/ui/uiwx/dForm.py 2011-10-28 19:21:50 UTC (rev 6953)
@@ -249,7 +249,6 @@
bizobj=biz)
self.update(0)
self.refresh()
- self.__inPointerMoveUpdate = False
def _moveRecordPointer(self, func, dataSource=None, *args, **kwargs):
@@ -296,7 +295,12 @@
return False
else:
if biz.RowNumber != oldRowNum:
- delay = self.RowNavigationDelay
+ curTime = time.time()
+ if curTime - getattr(self,
"_lastNavigationTime", 0) > .5:
+ delay = 0
+ else:
+ delay = self.RowNavigationDelay
+ self._lastNavigationTime = curTime
self._afterPointerMove() ## purposely putting
it here before the update
self.raiseEvent(dEvents.RowNavigation, biz=biz)
if delay:
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]