From 2a2ccc0e1ff1a70c6a15cb21566eb9d004200d15 Mon Sep 17 00:00:00 2001 From: Cogwheel-17646 Date: Fri, 9 May 2008 22:14:31 +0000 Subject: [PATCH] Fixed delete on an unsaved page --- WowLua.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/WowLua.lua b/WowLua.lua index 786acd1..6d329b2 100644 --- a/WowLua.lua +++ b/WowLua.lua @@ -397,8 +397,14 @@ function WowLua:Button_Undo(button) end function WowLua:Button_Delete(button) + if self:IsModified() then + -- Display the unsaved changes dialog + local dialog = StaticPopup_Show("WOWLUA_UNSAVED") + dialog.data = "Button_Delete" + return + end + local page, entry = self:GetCurrentPage() - if self:GetNumPages() == 1 then self:Button_New() self:Button_Previous() -- 1.7.9.5