diff Profile.lua @ 227:741c4f9b251e

Better handling of new profiles
author Flick
date Mon, 21 Mar 2011 11:10:23 -0700
parents d08a74e86c96
children ad40cd3fc7e9
line wrap: on
line diff
--- a/Profile.lua	Sat Mar 19 10:23:34 2011 -0700
+++ b/Profile.lua	Mon Mar 21 11:10:23 2011 -0700
@@ -122,3 +122,17 @@
 
   db.profile.dbversion = self.PROFILEVERSION_LATEST
 end
+
+function ReAction:OnProfileChanged()
+  self:UpgradeProfile()
+  self:RebuildAll()
+  if not self.db.global.skipKeybindWarning then
+    StaticPopup_Show("REACTION_KB_WARN") -- see Options.lua
+  end
+end
+
+function ReAction:OnNewProfile()
+  self.db.profile.dbversion = ReAction.PROFILEVERSION_LATEST
+  self:OnProfileChanged()
+end
+