Quantcast

-Slight fix for the linking of items in the BagSync Search window.

Xruptor [08-15-10 - 20:24]
-Slight fix for the linking of items in the BagSync Search window.
--Will now default to EditBox1 if none are open.
Filename
BagSync.toc
BagSync_Search.lua
diff --git a/BagSync.toc b/BagSync.toc
index 17b60d7..f7e29dd 100644
--- a/BagSync.toc
+++ b/BagSync.toc
@@ -2,7 +2,7 @@
 ## Title: BagSync
 ## Notes: BagSync tracks your characters items and displays it within tooltips.
 ## Author: Xruptor
-## Version: 4.2
+## Version: 4.3
 ## SavedVariables: BagSyncDB, BagSyncOpt, BagSyncGUILD_DB, BagSyncTOKEN_DB

 localization\localization.lua
diff --git a/BagSync_Search.lua b/BagSync_Search.lua
index ef7e02d..c761cf4 100644
--- a/BagSync_Search.lua
+++ b/BagSync_Search.lua
@@ -128,13 +128,18 @@ function bgSearch:LoadSlider()
 			row:SetScript("OnClick", function(self)
 				if self.link then
 					if IsShiftKeyDown() then
+						local passChk = false
 						for i = 1, NUM_CHAT_WINDOWS do
 							local editBox = _G[("ChatFrame%dEditBox"):format(i)]
 							if editBox:IsVisible() then
 								editBox:Insert(self.link)
+								passChk = true
 								break
 							end
 						end
+						if not passChk then
+							_G[("ChatFrame1EditBox"):Insert(self.link)
+						end
 					elseif IsControlKeyDown() then
 						DressUpItemLink(self.link)
 					end