

def _refresh_renderers(self):
    ' Refresh the renderers installed on the render window.\n\n        '
    d = self.declaration
    old = self._current_renderers
    new = set(filter(None, ([d.renderer] + d.renderers)))
    to_remove = old.difference(new)
    to_add = new.difference(old)
    window = self.vtk_widget.GetRenderWindow()
    for r in to_remove:
        window.RemoveRenderer(r)
    for r in to_add:
        window.AddRenderer(new)
    self._current_renderers = new

dataset/ETHPy150Open nucleic/enaml/enaml/qt/qt_vtk_canvas.py QtVTKCanvas._refresh_renderers/VarMisuse@100/147 `r`->`new`