Skip to content

Commit

Permalink
Fix #268
Browse files Browse the repository at this point in the history
  • Loading branch information
blitzmann committed Apr 9, 2015
1 parent f801d79 commit 0bc9264
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# Database version (int ONLY)
# Increment every time we need to flag for user database upgrade/modification
dbversion = 5
dbversion = 6

pyfaPath = None
savePath = None
Expand Down
9 changes: 9 additions & 0 deletions eos/db/migrations/upgrade6.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""
Migration 6
Overwrites damage profile 0 to reset bad uniform values (bad values set with bug)
"""

def upgrade(saveddata_engine):
saveddata_engine.execute('DELETE FROM damagePatterns WHERE name LIKE ? OR ID LIKE ?', ("Uniform", "1"))
saveddata_engine.execute('INSERT INTO damagePatterns VALUES (?, ?, ?, ?, ?, ?, ?)', (1, "Uniform", 25, 25, 25, 25, None))
4 changes: 4 additions & 0 deletions gui/patternEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,15 @@ def patternChanged(self, event=None):

def newPattern(self, event):
self.restrict()

self.block = True
# reset values
for type in self.DAMAGE_TYPES:
editObj = getattr(self, "%sEdit"%type)
editObj.SetValue(0)

self.block = False

self.btnSave.SetLabel("Create")
self.Refresh()
self.renamePattern()
Expand Down

0 comments on commit 0bc9264

Please sign in to comment.