コード例 #1
0
ファイル: Controller.py プロジェクト: Ultimaker/Uranium
 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)
コード例 #2
0
ファイル: Controller.py プロジェクト: OktayYazgac/Uranium
 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)
コード例 #3
0
    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)