Fix bug debug slow interface when refresh time of a DebugViewer is longer than debug refresh period
--- a/graphics/GraphicCommons.py Wed Jan 16 22:35:06 2013 +0100
+++ b/graphics/GraphicCommons.py Wed Jan 16 22:41:38 2013 +0100
@@ -402,8 +402,7 @@
self.LastRefreshTimer=None
self.TimerAccessLock.release()
if self.IsShown() and not self.Inhibited:
- current_time = gettime()
- if current_time - self.LastRefreshTime > REFRESH_PERIOD and DEBUG_REFRESH_LOCK.acquire(False):
+ if gettime() - self.LastRefreshTime > REFRESH_PERIOD and DEBUG_REFRESH_LOCK.acquire(False):
self.AccessLock.acquire()
self.HasAcquiredLock = True
self.AccessLock.release()
@@ -427,6 +426,8 @@
if self.HasAcquiredLock:
DEBUG_REFRESH_LOCK.release()
self.HasAcquiredLock = False
+ if gettime() - self.LastRefreshTime > REFRESH_PERIOD:
+ self.LastRefreshTime = gettime()
self.AccessLock.release()
#-------------------------------------------------------------------------------