MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / handleDrag

Method handleDrag

gui/builtinViews/fittingView.py:95–111  ·  view source on GitHub ↗
(self, type, fitID)

Source from the content-addressed store, hash-verified

93 view.fitSelected(event)
94
95 def handleDrag(self, type, fitID):
96 if type == "fit":
97 for page in self.multiSwitch._pages:
98 if isinstance(page, FittingView) and page.activeFitID == fitID:
99 index = self.multiSwitch.GetPageIndex(page)
100 self.multiSwitch.SetSelection(index)
101 wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,)))
102 return
103 elif isinstance(page, gui.builtinViews.emptyView.BlankPage):
104 view = FittingView(self.multiSwitch)
105 self.multiSwitch.ReplaceActivePage(view)
106 view.handleDrag(type, fitID)
107 return
108
109 view = FittingView(self.multiSwitch)
110 self.multiSwitch.AddPage(view)
111 view.handleDrag(type, fitID)
112
113
114FitSpawner.register()

Callers

nothing calls this directly

Calls 6

handleDragMethod · 0.95
FittingViewClass · 0.85
GetPageIndexMethod · 0.80
SetSelectionMethod · 0.80
ReplaceActivePageMethod · 0.80
AddPageMethod · 0.45

Tested by

no test coverage detected