Beispiel #1
0
 def handleDrag(self, type, fitID):
     # Those are drags coming from pyfa sources, NOT builtin wx drags
     if type == "fit":
         activeFit = self.mainFrame.getActiveFit()
         if activeFit:
             self.mainFrame.command.Submit(cmd.GuiAddProjectedFitCommand(
                 fitID=activeFit, projectedFitID=fitID, amount=1))
Beispiel #2
0
 def OnProjectToFit(self, event):
     activeFit = self.mainFrame.getActiveFit()
     if activeFit:
         sFit = Fit.getInstance()
         projectedFit = sFit.getFit(self.fitID)
         command = cmd.GuiAddProjectedFitCommand(fitID=activeFit, projectedFitID=projectedFit.ID, amount=1)
         if self.mainFrame.command.Submit(command):
             self.mainFrame.additionsPane.select("Projected")
Beispiel #3
0
    def handleSelection(self, event):
        fitID = self.mainFrame.getActiveFit()

        fit = self.fitLookup[event.Id]

        if self.context == 'commandView':
            self.mainFrame.command.Submit(
                cmd.GuiAddCommandFitCommand(fitID=fitID, commandFitID=fit.ID))
        elif self.context == 'projected':
            self.mainFrame.command.Submit(
                cmd.GuiAddProjectedFitCommand(fitID=fitID,
                                              projectedFitID=fit.ID))