diff gui.lua @ 24:61d932f0e8f2

Reassigning loot in the main tab also updates entries in the history tab.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Wed, 21 Sep 2011 06:21:48 +0000
parents 8664134bba4f
children cb9635999171
line wrap: on
line diff
--- a/gui.lua	Fri Sep 09 00:56:13 2011 +0000
+++ b/gui.lua	Wed Sep 21 06:21:48 2011 +0000
@@ -491,9 +491,7 @@
 	end,
 
 	df_REASSIGN = function(rowi,to_whom)
-		g_loot[rowi].person = to_whom
-		g_loot[rowi].person_class = select(2,UnitClass(to_whom))
-		-- FIXME also update history
+		addon:reassign_loot (rowi, to_whom)
 		CloseDropDownMenus()  -- also need to close parent menu
 	end,
 	["Enter name..."] = function(rowi)
@@ -2188,10 +2186,7 @@
 	end,]]
 	OnAccept = function(dialog, data)
 		local name = dialog.usertext --editBox:GetText()
-		g_loot[data.index].person = name
-		g_loot[data.index].person_class = select(2,UnitClass(name))
-		-- FIXME also update history
-		addon:Print("Reassigned entry %d to '%s'.", data.index, name)
+		addon:reassign_loot (data.index, name)
 		data.display:GetUserData("eoiST"):OuroLoot_Refresh(data.index)
 	end,
 }