so many pep8 fixes
(cherry picked from commit bee125d)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#===============================================================================
|
||||
# =============================================================================
|
||||
# Copyright (C) 2010 Diego Duclos
|
||||
#
|
||||
# This file is part of pyfa.
|
||||
@@ -15,21 +15,23 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
|
||||
#===============================================================================
|
||||
# =============================================================================
|
||||
|
||||
|
||||
import wx
|
||||
from gui.bitmapLoader import BitmapLoader
|
||||
|
||||
|
||||
class CachingImageList(wx.ImageList):
|
||||
def __init__(self, width, height):
|
||||
wx.ImageList.__init__(self, width, height)
|
||||
self.map = {}
|
||||
|
||||
def GetImageIndex(self, *loaderArgs):
|
||||
id = self.map.get(loaderArgs)
|
||||
if id is None:
|
||||
id_ = self.map.get(loaderArgs)
|
||||
if id_ is None:
|
||||
bitmap = BitmapLoader.getBitmap(*loaderArgs)
|
||||
if bitmap is None:
|
||||
return -1
|
||||
id = self.map[loaderArgs] = wx.ImageList.Add(self,bitmap)
|
||||
return id
|
||||
id_ = self.map[loaderArgs] = wx.ImageList.Add(self, bitmap)
|
||||
return id_
|
||||
|
||||
Reference in New Issue
Block a user