Closed malte-storm closed 3 weeks ago
Thanks for the investigation and the fix!
Looking at it, it seems self.__index
is not needed and the following would simplify the code:
def __getStackIndex(self, view):
widget = view.getWidget()
index = self.__stack.indexOf(widget)
if index != -1:
return index
return self.__stack.addWidget(widget)
But let's keep this for later.
Fixed issue #4130 which occured after using the
silx.gui.data.DataViewer.DataViewer.removeView
method which invalidated theindex
dictionary for accessing widgets. Switching between views modified the referenced__stack
without updating the__index
.