From: <cl...@us...> - 2003-03-09 19:56:41
|
Update of /cvsroot/todo-manager/todo-manager In directory sc8-pr-cvs1:/tmp/cvs-serv11022 Modified Files: objectlistbox.py Log Message: Draw Cache cleanups. This looks cleaner now Index: objectlistbox.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/objectlistbox.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- objectlistbox.py 9 Mar 2003 19:06:51 -0000 1.8 +++ objectlistbox.py 9 Mar 2003 19:56:38 -0000 1.9 @@ -213,8 +213,7 @@ else: self.__objects[row][column] = obj - if not self.__draw_cache: - self.draw() + self.draw() def insert_object(self, row, column, function): if row == END: row = self.count() @@ -235,8 +234,7 @@ else: self.__objects[row][column] = obj - if not self.__draw_cache: - self.draw() + self.draw() def get_column_text(self, row, column): try: @@ -267,8 +265,7 @@ else: del self.__objects[index] - if not self.__draw_cache: - self.draw() + self.draw() def curselection(self): return self.__cursel @@ -317,11 +314,13 @@ def end_draw_cache(self): """End the draw cache and update the list.""" - self.draw() self.__draw_cache = FALSE + self.draw() def draw(self): # ...and the fun begins + if self.__draw_cache: return + canvas = self._canvas canvas.delete(ALL) |