Merge branch 'development' of https://github.com/pyfa-org/Pyfa into development
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# pyfa
|
# pyfa
|
||||||
|
|
||||||
[](https://pyfainvite.azurewebsites.net/)
|
[](https://pyfainvite.azurewebsites.net/) [](https://travis-ci.org/pyfa-org/Pyfa)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -159,7 +159,6 @@ class HandledModuleList(HandledList):
|
|||||||
dummy.position = index
|
dummy.position = index
|
||||||
self[index] = dummy
|
self[index] = dummy
|
||||||
|
|
||||||
|
|
||||||
def toModule(self, index, mod):
|
def toModule(self, index, mod):
|
||||||
mod.position = index
|
mod.position = index
|
||||||
self[index] = mod
|
self[index] = mod
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ from service.fit import Fit
|
|||||||
from service.price import Price
|
from service.price import Price
|
||||||
from service.market import Market
|
from service.market import Market
|
||||||
|
|
||||||
|
|
||||||
class PFGeneralPref(PreferenceView):
|
class PFGeneralPref(PreferenceView):
|
||||||
title = "General"
|
title = "General"
|
||||||
|
|
||||||
@@ -87,10 +88,10 @@ class PFGeneralPref(PreferenceView):
|
|||||||
self.stDefaultSystem.Wrap(-1)
|
self.stDefaultSystem.Wrap(-1)
|
||||||
priceSizer.Add(self.stDefaultSystem, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
|
priceSizer.Add(self.stDefaultSystem, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
|
||||||
|
|
||||||
self.chPriceSystem = wx.Choice( panel, choices=Price.systemsList.keys())
|
self.chPriceSystem = wx.Choice(panel, choices=Price.systemsList.keys())
|
||||||
priceSizer.Add(self.chPriceSystem, 1, wx.ALL | wx.EXPAND, 5)
|
priceSizer.Add(self.chPriceSystem, 1, wx.ALL | wx.EXPAND, 5)
|
||||||
|
|
||||||
mainSizer.Add(priceSizer, 0, wx.ALL|wx.EXPAND, 0)
|
mainSizer.Add(priceSizer, 0, wx.ALL | wx.EXPAND, 0)
|
||||||
|
|
||||||
self.sFit = Fit.getInstance()
|
self.sFit = Fit.getInstance()
|
||||||
|
|
||||||
@@ -207,4 +208,5 @@ class PFGeneralPref(PreferenceView):
|
|||||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
|
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
|
||||||
event.Skip()
|
event.Skip()
|
||||||
|
|
||||||
|
|
||||||
PFGeneralPref.register()
|
PFGeneralPref.register()
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ class PriceViewFull(StatsView):
|
|||||||
setattr(self, "labelPrice%s" % type.capitalize(), lbl)
|
setattr(self, "labelPrice%s" % type.capitalize(), lbl)
|
||||||
hbox.Add(lbl, 0, wx.ALIGN_LEFT)
|
hbox.Add(lbl, 0, wx.ALIGN_LEFT)
|
||||||
|
|
||||||
|
|
||||||
def refreshPanel(self, fit):
|
def refreshPanel(self, fit):
|
||||||
if fit is not None:
|
if fit is not None:
|
||||||
self.fit = fit
|
self.fit = fit
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ except ImportError:
|
|||||||
mplImported = False
|
mplImported = False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@@ -69,10 +68,9 @@ class GraphFrame(wx.Frame):
|
|||||||
from matplotlib.figure import Figure
|
from matplotlib.figure import Figure
|
||||||
graphFrame_enabled = True
|
graphFrame_enabled = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
mpl = Canvas = Figure = None
|
Patch = mpl = Canvas = Figure = None
|
||||||
graphFrame_enabled = False
|
graphFrame_enabled = False
|
||||||
|
|
||||||
|
|
||||||
self.legendFix = False
|
self.legendFix = False
|
||||||
if not graphFrame_enabled:
|
if not graphFrame_enabled:
|
||||||
logger.info("Problems importing matplotlib; continuing without graphs")
|
logger.info("Problems importing matplotlib; continuing without graphs")
|
||||||
@@ -284,7 +282,7 @@ class GraphFrame(wx.Frame):
|
|||||||
selected_color = legend_colors[i]
|
selected_color = legend_colors[i]
|
||||||
except:
|
except:
|
||||||
selected_color = None
|
selected_color = None
|
||||||
legend2.append(self.Patch(color=selected_color,label=i_name),)
|
legend2.append(self.Patch(color=selected_color, label=i_name), )
|
||||||
|
|
||||||
if len(legend2) > 0:
|
if len(legend2) > 0:
|
||||||
leg = self.subplot.legend(handles=legend2)
|
leg = self.subplot.legend(handles=legend2)
|
||||||
|
|||||||
@@ -69,7 +69,9 @@ class Fit(object):
|
|||||||
"showMarketShortcuts": False,
|
"showMarketShortcuts": False,
|
||||||
"enableGaugeAnimation": True,
|
"enableGaugeAnimation": True,
|
||||||
"exportCharges": True,
|
"exportCharges": True,
|
||||||
"priceSystem": "Jita"}
|
"openFitInNew": False,
|
||||||
|
"priceSystem": "Jita",
|
||||||
|
}
|
||||||
|
|
||||||
self.serviceFittingOptions = SettingsProvider.getInstance().getSettings(
|
self.serviceFittingOptions = SettingsProvider.getInstance().getSettings(
|
||||||
"pyfaServiceFittingOptions", serviceFittingDefaultOptions)
|
"pyfaServiceFittingOptions", serviceFittingDefaultOptions)
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class Price(object):
|
|||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def invalidPrices(self, prices):
|
def invalidPrices(cls, prices):
|
||||||
for price in prices:
|
for price in prices:
|
||||||
price.time = 0
|
price.time = 0
|
||||||
|
|
||||||
@@ -130,10 +130,9 @@ class Price(object):
|
|||||||
priceobj.failed = True
|
priceobj.failed = True
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def fitItemsList(self, fit):
|
def fitItemsList(cls, fit):
|
||||||
# Compose a list of all the data we need & request it
|
# Compose a list of all the data we need & request it
|
||||||
typeIDs = []
|
typeIDs = [fit.ship.item.ID]
|
||||||
typeIDs.append(fit.ship.item.ID)
|
|
||||||
|
|
||||||
for mod in fit.modules:
|
for mod in fit.modules:
|
||||||
if not mod.isEmpty:
|
if not mod.isEmpty:
|
||||||
@@ -148,4 +147,4 @@ class Price(object):
|
|||||||
for cargo in fit.cargo:
|
for cargo in fit.cargo:
|
||||||
typeIDs.append(cargo.itemID)
|
typeIDs.append(cargo.itemID)
|
||||||
|
|
||||||
return typeIDs
|
return typeIDs
|
||||||
|
|||||||
Reference in New Issue
Block a user