mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Make middle-mouse button handle temporary settings.
This commit is contained in:
parent
3d05662384
commit
a8c05fc6ee
1 changed files with 18 additions and 5 deletions
|
|
@ -229,9 +229,21 @@ public sealed class ModFileSystemSelector : FileSystemSelector<Mod, ModFileSyste
|
||||||
var (setting, collection) = _collectionManager.Active.Current.GetActualSettings(leaf.Value.Index);
|
var (setting, collection) = _collectionManager.Active.Current.GetActualSettings(leaf.Value.Index);
|
||||||
if (_config.DeleteModModifier.ForcedModifier(new DoubleModifier(ModifierHotkey.Control, ModifierHotkey.Shift)).IsActive())
|
if (_config.DeleteModModifier.ForcedModifier(new DoubleModifier(ModifierHotkey.Control, ModifierHotkey.Shift)).IsActive())
|
||||||
{
|
{
|
||||||
|
// Delete temporary settings if they exist, regardless of mode, or set to inheriting if none exist.
|
||||||
|
if (_collectionManager.Active.Current.GetTempSettings(leaf.Value.Index) is not null)
|
||||||
|
_collectionManager.Editor.SetTemporarySettings(_collectionManager.Active.Current, leaf.Value, null);
|
||||||
|
else
|
||||||
_collectionManager.Editor.SetModInheritance(_collectionManager.Active.Current, leaf.Value, true);
|
_collectionManager.Editor.SetModInheritance(_collectionManager.Active.Current, leaf.Value, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (_config.DefaultTemporaryMode)
|
||||||
|
{
|
||||||
|
var settings = new TemporaryModSettings(leaf.Value, setting) { ForceInherit = false };
|
||||||
|
settings.Enabled = !settings.Enabled;
|
||||||
|
_collectionManager.Editor.SetTemporarySettings(_collectionManager.Active.Current, leaf.Value, settings);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
var inherited = collection != _collectionManager.Active.Current;
|
var inherited = collection != _collectionManager.Active.Current;
|
||||||
if (inherited)
|
if (inherited)
|
||||||
|
|
@ -239,6 +251,7 @@ public sealed class ModFileSystemSelector : FileSystemSelector<Mod, ModFileSyste
|
||||||
_collectionManager.Editor.SetModState(_collectionManager.Active.Current, leaf.Value, setting is not { Enabled: true });
|
_collectionManager.Editor.SetModState(_collectionManager.Active.Current, leaf.Value, setting is not { Enabled: true });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!state.Priority.IsDefault && !_config.HidePrioritiesInSelector)
|
if (!state.Priority.IsDefault && !_config.HidePrioritiesInSelector)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue