示例#1
0
 def __handleImplant(self, callingWindow, mainItem, selection):
     fitID = self.mainFrame.getActiveFit()
     fit = Fit.getInstance().getFit(fitID)
     positions = []
     for implant in selection:
         if implant in fit.implants:
             positions.append(fit.implants.index(implant))
     self.mainFrame.command.Submit(
         cmd.GuiRemoveImplantsCommand(fitID=fitID, positions=positions))
示例#2
0
 def removeImplants(self, implants):
     fitID = self.mainFrame.getActiveFit()
     fit = Fit.getInstance().getFit(fitID)
     if fit.implantLocation != ImplantLocation.FIT:
         return
     positions = []
     for implant in implants:
         if implant in self.original:
             positions.append(self.original.index(implant))
     self.mainFrame.command.Submit(cmd.GuiRemoveImplantsCommand(fitID=fitID, positions=positions))