Esempio n. 1
0
 def _merge(self, srcRow, dstRow):
     fitID = self.mainFrame.getActiveFit()
     fit = Fit.getInstance().getFit(fitID)
     self.mainFrame.command.Submit(
         cmd.GuiMergeLocalDroneStacksCommand(
             fitID=fitID,
             srcPosition=fit.drones.index(self.drones[srcRow]),
             dstPosition=fit.drones.index(self.drones[dstRow])))
Esempio n. 2
0
 def _merge(self, srcRow, dstRow):
     fitID = self.mainFrame.getActiveFit()
     try:
         srcDrone = self.drones[srcRow]
         dstDrone = self.drones[dstRow]
     except IndexError:
         return
     if srcDrone in self.original and dstDrone in self.original:
         srcPosition = self.original.index(srcDrone)
         dstPosition = self.original.index(dstDrone)
         self.mainFrame.command.Submit(cmd.GuiMergeLocalDroneStacksCommand(
             fitID=fitID, srcPosition=srcPosition, dstPosition=dstPosition))