Skip to content

Commit

Permalink
rename _contentToUpdate to __itemsToUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
t20100 committed Dec 5, 2023
1 parent 5b7f388 commit 1247f45
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/silx/gui/plot/PlotWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def __init__(self, parent=None, backend=None):

# Items handling
self.__items = []
self._contentToUpdate = [] # Used as an OrderedSet
self.__itemsToUpdate = [] # Used as an OrderedSet

self._dataRange = None

Expand Down Expand Up @@ -929,9 +929,9 @@ def _itemRequiresUpdate(self, item):
"""
assert item.getPlot() == self
# Put item at the end of the list
if item in self._contentToUpdate:
self._contentToUpdate.remove(item)
self._contentToUpdate.append(item)
if item in self.__itemsToUpdate:
self.__itemsToUpdate.remove(item)
self.__itemsToUpdate.append(item)
self._setDirtyPlot(overlayOnly=item.isOverlay())

def addItem(self, item):
Expand Down Expand Up @@ -979,8 +979,8 @@ def removeItem(self, item):

# Remove item from plot
self.__items.remove(item)
if item in self._contentToUpdate:
self._contentToUpdate.remove(item)
if item in self.__itemsToUpdate:
self.__itemsToUpdate.remove(item)
if item.isVisible():
self._setDirtyPlot(overlayOnly=item.isOverlay())
if item.getBounds() is not None:
Expand Down Expand Up @@ -3126,10 +3126,10 @@ def _paintContext(self):
It is in charge of performing required PlotWidget operations
"""
for item in self._contentToUpdate:
for item in self.__itemsToUpdate:
item._update(self._backend)

self._contentToUpdate = []
self.__itemsToUpdate = []
yield
self._dirty = False # reset dirty flag

Expand Down

0 comments on commit 1247f45

Please sign in to comment.