File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -224,6 +224,14 @@ function Addon.BindingConfig.ImportStringPage:RedrawToReview()
224224 Addon .BindingConfig .Window :Select (review .binding .uid )
225225 else
226226 self .controller :PopPage (self )
227+ if not Addon .BindingConfig .Window :IsOpen () then
228+ Addon .BindingConfig .Window :Open ()
229+ end
230+ if type (review .groups ) == " table" and review .groups [1 ] then
231+ Addon .BindingConfig .Window :Select (review .groups [1 ].uid )
232+ elseif type (review .bindings ) == " table" and review .binding [1 ] then
233+ Addon .BindingConfig .Window :Select (review .bindings [1 ].uid )
234+ end
227235 end
228236 end )
229237
Original file line number Diff line number Diff line change @@ -80,6 +80,29 @@ local function RegisterProfile(data)
8080 Addon .db .profile [key ] = data [key ]
8181 end
8282
83+ -- ensure UIDs are unique
84+ if data .groups then
85+ for _ , group in pairs (data .groups ) do
86+ local oldUID = group .uid
87+ group .uid = Addon :GetNextUid ()
88+
89+ if oldUID then
90+ for _ , binding in pairs (data .bindings ) do
91+ if binding .parent == oldUID then
92+ binding .parent = group .uid
93+ end
94+ end
95+ end
96+ end
97+ end
98+
99+ if data .bindings then
100+ for _ , binding in pairs (data .bindings ) do
101+ binding .uid = Addon :GetNextUid ()
102+ end
103+ end
104+
105+
83106 Clicked :ReloadDatabase ()
84107end
85108
You can’t perform that action at this time.
0 commit comments