From 7b0d43cbb26e10a41679fa478b325aed7c574c40 Mon Sep 17 00:00:00 2001 From: Nightblade Date: Sun, 22 Sep 2024 19:36:56 +1000 Subject: [PATCH] move to keypress handling code --- src/Classes/Item.lua | 4 ---- src/Classes/ItemsTab.lua | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Classes/Item.lua b/src/Classes/Item.lua index 03f64861305..8291b4980d6 100644 --- a/src/Classes/Item.lua +++ b/src/Classes/Item.lua @@ -298,10 +298,6 @@ function ItemClass:ParseRaw(raw, rarity, highQuality) self.rawLines = { } -- Find non-blank lines and trim whitespace for line in raw:gmatch("%s*([^\n]*%S)") do - if not main.seenAdvIDWarn and line:match("^{ ") then - main:OpenMessagePopup("Warning", "\"Advanced Item Descriptions\" (Ctrl+Alt+c) are currently unsupported.\n\nPlease try again using Ctrl+c only.") - main.seenAdvIDWarn = true - end t_insert(self.rawLines, line) end local mode = rarity and "GAME" or "WIKI" diff --git a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua index 8c8643239b1..86283709ef5 100644 --- a/src/Classes/ItemsTab.lua +++ b/src/Classes/ItemsTab.lua @@ -1170,6 +1170,11 @@ function ItemsTabClass:Draw(viewPort, inputEvents) if event.type == "KeyDown" then if event.key == "v" and IsKeyDown("CTRL") then local newItem = Paste() + if newItem:gmatch("^{ ") then + main:OpenConfirmPopup("Warning", "\"Advanced Item Descriptions\" (Ctrl+Alt+c) are unsupported.\n\nAbort paste?", "OK", function() + self:SetDisplayItem() + end) + end if newItem then self:CreateDisplayItemFromRaw(newItem, true) end