Skip to content

Commit

Permalink
Version 268:
Browse files Browse the repository at this point in the history
* Fixed a bug in the implementation of the `OverrideDefaultSetting` method's `IncludeInOptionsWindow` argument (used in `ui3-local-overrides.js` files).
  * This argument's value is now persisted when you have UI3 generate a new local overrides file (as was originally intended).
  * Calling `OverrideDefaultSetting` with `IncludeInOptionsWindow` set to false no longer is irreversible; you can call it again set to true to re-show a setting that was hidden by an earlier call.
  • Loading branch information
bp2008 committed Feb 12, 2024
1 parent 188d4ea commit b59fc07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ui3.htm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
};
</script>
<script type="text/javascript">
var ui_version = "267";
var ui_version = "268";
var bi_version = "%%VERSION%%";
var appPath_raw = "%%VIRTDIR%%";
var local_bi_session = "%%SESSION%%";
Expand Down
7 changes: 3 additions & 4 deletions ui3/ui3.js
Original file line number Diff line number Diff line change
Expand Up @@ -3145,8 +3145,7 @@ function OverrideDefaultSetting(key, value, IncludeInOptionsWindow, AlwaysReload
defaultSettings[i].value = value;
defaultSettings[i].AlwaysReload = AlwaysReload;
defaultSettings[i].Generation = Generation;
if (!IncludeInOptionsWindow)
defaultSettings[i].label = null;
defaultSettings[i].IncludeInOptionsWindow = IncludeInOptionsWindow;
break;
}
}
Expand Down Expand Up @@ -31871,7 +31870,7 @@ function UISettingsPanel()
for (var i = 0; i < defaultSettings.length; i++)
{
var s = defaultSettings[i];
if (s.label)
if (s.label && (typeof s.IncludeInOptionsWindow == "undefined" || s.IncludeInOptionsWindow))
{
if (typeof s.category == "undefined")
s.category = "Uncategorized";
Expand Down Expand Up @@ -31937,7 +31936,7 @@ function UISettingsPanel()
for (var i = 0; i < defaultSettings.length; i++)
{
var s = defaultSettings[i];
var isDisplayable = (s.label || (s.comment && s.inputType === "comment")) && s.category === category;
var isDisplayable = (s.label || (s.comment && s.inputType === "comment")) && s.category === category && (typeof s.IncludeInOptionsWindow == "undefined" || s.IncludeInOptionsWindow);
if (isDisplayable && (typeof s.preconditionFunc !== "function" || s.preconditionFunc()) && processFilter(s))
{
var $row = $('<div class="uiSettingsRow withDefaultBtn"></div>');
Expand Down

0 comments on commit b59fc07

Please sign in to comment.