You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -590,7 +588,12 @@ function DialogKey:AddFrame(frameName)
590
588
return
591
589
end
592
590
593
-
self.db.customFrames[frameName] =true
591
+
ifself.db.customFrames[frameName] then
592
+
self:print("Frame is already on the watchlist:", frameName)
593
+
self:Glow(frame, 0.25, true)
594
+
return
595
+
end
596
+
ns:AddToWatchlist(frameName)
594
597
self:Glow(frame, 0.25, true)
595
598
self:print("Added frame:", frameName, ". Remove it again with /dialogkey remove; or in the options UI.")
596
599
end
@@ -607,14 +610,20 @@ function DialogKey:RemoveFrame(frameName)
607
610
self:print("No clickable frame found under your mouse. Try /fstack and find the name of the frame, and remove it manually with /dialogkey remove <frameName>")
608
611
return
609
612
end
613
+
localindex=self.db.customFrames[frameName]
614
+
ifnotindexthen
615
+
self:print("The clickable frame under your mouse isn't on the custom watchlist:", frameName)
616
+
self:Glow(frame, 0.25, true)
617
+
return
618
+
end
610
619
611
-
self.db.customFrames[frameName] =nil
620
+
ns:RemoveFromWatchlist(frameName)
612
621
self:Glow(frame, 0.25, true)
613
622
self:print("Removed frame:", frameName)
614
623
end
615
624
616
625
--- Returns the first clickable frame that has mouse focus
617
-
--- @returnScriptRegion?, string? # The frame under the cursor, and its name; or nil
626
+
--- @returnFrame?, string? # The frame under the cursor, and its name; or nil
0 commit comments