Skip to content

Commit bc525e0

Browse files
committed
Fix collapse non-active sub splits selection
Variable was not given by reference to PrepareVisibleSplit. (cherry picked from commit 3297530)
1 parent a4761a0 commit bc525e0

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Designs/HitCounterGui.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@
7373
{
7474
// show subsplits always (0) or
7575
// only for collapsed visibility (1) when this is a subsplit from active group
76-
if (d.subsplits_visibility == 0 || (d.subsplits_visibility == 1 && active_subsplit)) s.display = true;
76+
if (d.subsplits_visibility == 0 || (d.subsplits_visibility == 1 && active_subsplit.value)) s.display = true;
7777
}
7878
else
7979
{
8080
// sum up values from hidden (2) or collapsed (1) non-active subsplits
81-
if (d.subsplits_visibility == 2 || (d.subsplits_visibility == 1 && !active_subsplit))
81+
if (d.subsplits_visibility == 2 || (d.subsplits_visibility == 1 && !active_subsplit.value))
8282
{
8383
let found_active = false;
8484
for ( let k = i + 1; k < splits.length ; k = k + 1 )
@@ -97,7 +97,7 @@
9797
}
9898
if (found_active) s.active = true;
9999
}
100-
active_subsplit = false;
100+
active_subsplit.value = false;
101101
s.display = true;
102102
}
103103
}
@@ -187,9 +187,9 @@
187187
let display_post = d.split_last - d.split_active;
188188

189189
// mark the splits for display that do not exeed maximum splits and take care of hidden splits
190-
let active_subsplit;
190+
let active_subsplit = { value: true };
191191
// looking from active split backwards
192-
active_subsplit = true;
192+
active_subsplit.value = true;
193193
for ( let i = d.split_active ; 0 <= i ; i = i - 1 )
194194
{
195195
let s = splits[i];
@@ -213,12 +213,12 @@
213213
display_pre = display_pre - 1;
214214
}
215215
// looking past the active split onwards
216-
active_subsplit = true;
216+
active_subsplit.value = true;
217217
for ( let i = d.split_active + 1; i < splits.length ; i = i + 1 )
218218
{
219219
let s = splits[i];
220220

221-
if (!s.subsplit) active_subsplit = false; // first non-subsplit is not active one
221+
if (!s.subsplit) active_subsplit.value = false; // first non-subsplit is not active one
222222
PrepareVisibleSplit(i, d, active_subsplit, splits);
223223

224224
if (display_post == 1)

0 commit comments

Comments
 (0)