Ejemplo n.º 1
0
 def shouldShow(self):
     for obj in FreeCADGui.Selection.getSelection():
         if AppScript.getObjectType(obj) == "App::UsbPool" and\
            GuiScript.getObjectViewType(obj.ViewObject) == "Gui::UsbTinyG2":
             self.view.setModel(obj.ViewObject.Proxy.Model)
             return True
     self.view.setModel(self.model)
     return False
Ejemplo n.º 2
0
 def shouldShow(self):
     for obj in FreeCADGui.Selection.getSelection():
         if AppScript.getObjectType(obj) == "App::UsbPool" and\
            GuiScript.getObjectViewType(obj.ViewObject) == "Gui::UsbTinyG2":
             self.view.setModel(obj.ViewObject.Proxy.Model)
             return True
     self.view.setModel(self.model)
     return False
Ejemplo n.º 3
0
 def updateData(self, obj, prop): #optional
     # this is executed when a property of the APP OBJECT changes
     if prop == "Serials" and obj.Proxy.Update:
         for o in obj.Serials:
             if Script.getObjectViewType(o.ViewObject) is None:
                 PySerialGui._ViewProviderPort(o.ViewObject)