def addView(self, view: View) -> None: name = view.getPluginId() if name not in self._views: self._views[name] = view view.setRenderer(self._application.getRenderer()) self.viewsChanged.emit() else: Logger.log("w", "%s was already added to view list. Unable to add it again.", name)
def addView(self, view: View) -> None: """Add a view by name if it"s not already added. :param view: The view to be added """ name = view.getId() if name not in self._views: self._views[name] = view view.setRenderer(self._application.getRenderer()) self.viewsChanged.emit() else: Logger.log("w", "%s was already added to view list. Unable to add it again.", name)