Skip to content

Commit 391c843

Browse files
committed
Capture parent scope upon creating a binding
1 parent af998d9 commit 391c843

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ The format of this changelog is based on [Keep a Changelog](https://keepachangel
88
* The MINOR component is used whenever a version has backwards-compatible profile changes. This also indicates that the user can not switch back to a previous MINOR version without using a backup.
99
* The PATCH component is used for versions that do not contain profile format changes. Users can freely switch between PATCH versions without risk of data loss.
1010

11+
## [Unreleased]
12+
13+
### Fixed
14+
15+
* Fix bindings created in the global scope not actually being global
16+
1117
## [1.17.3] - 2026-01-25
1218

1319
### Fixed

Clicked/BindingConfig/Pages/New.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ end
5151
--- @param parent DataObject?
5252
--- @return Binding
5353
local function CreateBinding(type, parent)
54-
local binding = Clicked:CreateBinding()
54+
local binding = Clicked:CreateBinding(parent ~= nil and parent.scope or nil)
5555

5656
if type == ItemTemplate.BINDING_CAST_SPELL then
5757
binding.actionType = Clicked.ActionType.SPELL

Clicked/Core/Database.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,12 @@ end
202202
--- Create a new binding. This will create and return a new binding, however it will not automatically reload the active bindings, after configuring the
203203
--- returned binding (to make it loadable), manually reload the active bindings using `ReloadBindings`.
204204
---
205+
--- @param scope? DataObjectScope
205206
--- @return Binding
206-
function Clicked:CreateBinding()
207+
function Clicked:CreateBinding(scope)
207208
local binding = Addon:GetNewBindingTemplate()
208209

209-
Addon:RegisterDataObject(binding)
210+
Addon:RegisterDataObject(binding, scope)
210211
return binding
211212
end
212213

0 commit comments

Comments
 (0)