Skip to content

Commit 6d4265a

Browse files
committed
disable re-import current button instead of using a popup when none imported
1 parent 7530c45 commit 6d4265a

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

src/Classes/CompareTab.lua

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ function CompareTabClass:InitControls()
232232
tooltip:AddLine(14, "^7Go to Import/Export Build tab and select a character first.")
233233
end
234234
end
235+
self.controls.reimportBtn.enabled = function()
236+
local importTab = self.primaryBuild.importTab
237+
return importTab and importTab.charImportMode == "SELECTCHAR"
238+
end
235239

236240
-- Remove comparison build button
237241
self.controls.removeBtn = new("ButtonControl", {"LEFT", self.controls.reimportBtn, "RIGHT"}, {4, 0, 70, 20}, "Remove", function()
@@ -1409,14 +1413,6 @@ end
14091413
-- Re-import primary build using character import (same as Import/Export tab)
14101414
function CompareTabClass:ReimportPrimary()
14111415
local importTab = self.primaryBuild.importTab
1412-
if not importTab then
1413-
main:OpenMessagePopup("Re-import", "Import tab not available.")
1414-
return
1415-
end
1416-
if importTab.charImportMode ~= "SELECTCHAR" then
1417-
main:OpenMessagePopup("Re-import", "No character selected.\nGo to the Import/Export Build tab, enter your account name,\nand select a character first.")
1418-
return
1419-
end
14201416
-- Set clear checkboxes to true (delete existing jewels, skills, equipment)
14211417
importTab.controls.charImportTreeClearJewels.state = true
14221418
importTab.controls.charImportItemsClearSkills.state = true

0 commit comments

Comments
 (0)