Ejemplo n.º 1
0
 def OnAddCommandFit(self, event):
     activeFit = self.mainFrame.getActiveFit()
     if activeFit:
         if self.mainFrame.command.Submit(
                 cmd.GuiAddCommandFitCommand(fitID=activeFit,
                                             commandFitID=self.fitID)):
             self.mainFrame.additionsPane.select("Command")
Ejemplo n.º 2
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.GuiAddCommandFitCommand(fitID=activeFit,
                                             commandFitID=fitID))
Ejemplo n.º 3
0
    def handleSelection(self, event):
        fit = self.fitMenuItemIds[event.Id]
        if fit is False or fit not in self.__class__.commandFits:
            event.Skip()
            return

        fitID = self.mainFrame.getActiveFit()
        self.mainFrame.command.Submit(
            cmd.GuiAddCommandFitCommand(fitID, fit.ID))
Ejemplo n.º 4
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))