Rework of the shipBrowser drag system, make it extensible and reusable

This commit is contained in:
cncfanatics
2010-11-22 20:54:08 +01:00
parent 1b85b107c0
commit fcbecb37ca
5 changed files with 66 additions and 29 deletions

View File

@@ -91,6 +91,10 @@ class GraphFrame(wx.Frame):
self.mainFrame.Bind(gui.builtinViews.fittingView.FIT_CHANGED, self.draw)
self.Bind(wx.EVT_CLOSE, self.close)
def handleDrag(self, type, fitID):
if type == "fit":
self.AppendFitToList(fitID)
def close(self, event):
self.fitList.fitList.Unbind(wx.EVT_LEFT_DCLICK, handler=self.removeItem)
self.mainFrame.Unbind(gui.builtinViews.fittingView.FIT_CHANGED, handler=self.draw)