Version 3.1.11, fixed removal of char from UI after deletion

His Dad [01-05-15 - 18:48]
Version 3.1.11, fixed removal of char from UI after deletion
Filename
AIResearchGrid.lua
AIResearchGrid.txt
doc/changelog.txt
diff --git a/AIResearchGrid.lua b/AIResearchGrid.lua
index 54ea619..c7f27db 100644
--- a/AIResearchGrid.lua
+++ b/AIResearchGrid.lua
@@ -7,7 +7,7 @@ local _
 AIRG = {}

 AIRG.name = "AIResearchGrid"
-AIRG.version = "3.1.10"
+AIRG.version = "3.1.11"
 AIRG.initialised = false
 AIRG.processing = false
 AIRG.all = " #ALL"  -- Default displayname for Virtual character, overrwritten by Localised version
@@ -462,6 +462,7 @@ end -- AIRG.OnCharacterSelect

 -- Deletes data for the named character from the saved data and removes them from the dropdown box.
 function AIRG.DeleteCharacter(charName)
+	local i,item
     -- Can't delete the current character
     if (charName == AIRG.curCharacter) then
         d(AIRG.L["DeleteFalse"])
@@ -473,8 +474,15 @@ function AIRG.DeleteCharacter(charName)
         if (AIRG.vars.styles[charName] ~= nil) then
             AIRG.vars.styles[charName] = nil
         end
-		ReloadUI(AIRG.name)   -- Doesn't do anything??  Need to reloadui manually
         AIRG.PopulateAll()
+		--this part is new, Thank you Garkin
+        for i, item in ipairs(AIRG.UI.charDropdown.dropdown.m_sortedItems) do
+            if item.name == charName then
+                table.remove(AIRG.UI.charDropdown.dropdown.m_sortedItems, i)
+                break
+            end
+        end
+        AIRG.UI.charDropdown.dropdown:UpdateItems()
     end
 end -- AIRG.DeleteCharacter

diff --git a/AIResearchGrid.txt b/AIResearchGrid.txt
index 1f68d0d..dd377c2 100644
--- a/AIResearchGrid.txt
+++ b/AIResearchGrid.txt
@@ -1,6 +1,6 @@
-## Title: |cFFFFB0Research Grid|r v3.1.10
+## Title: |cFFFFB0Research Grid|r v3.1.11
 ## APIVersion: 100010
-## Version: 3.1.10
+## Version: 3.1.11
 ## Author: Stormknight and Team
 ## OptionalDependsOn: LibAddonMenu-2.0
 ## SavedVariables: AIRG_SavedVariables
diff --git a/doc/changelog.txt b/doc/changelog.txt
index be33d95..7684a54 100644
--- a/doc/changelog.txt
+++ b/doc/changelog.txt
@@ -1,3 +1,10 @@
+2015-01-05  V3.1.11
+    New Feature
+	None
+	Bug Fixed
+	When you delte character data (using the Settings Dialog), it now removes that char from the UI, thank you Garkin
+	Updated Version String.
+
 2015-01-05  V3.1.10
     New Feature
 	Traits now also show the total for that skill.