pass in systemId dependency to PathConfig
This commit is contained in:
parent
777a2e8f3e
commit
13b6b09771
|
@ -981,7 +981,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void PathsMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var form = new PathConfig(this, Config);
|
||||
using var form = new PathConfig(this, Config, Game.System);
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
|
|
|
@ -584,7 +584,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return;
|
||||
}
|
||||
|
||||
using var pathConfig = new PathConfig(_mainForm, GlobalWin.Config);
|
||||
using var pathConfig = new PathConfig(_mainForm, GlobalWin.Config, GlobalWin.Game.System);
|
||||
pathConfig.ShowDialog(this);
|
||||
RefreshBasePath();
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
private readonly Config _config;
|
||||
private readonly MainForm _mainForm;
|
||||
private readonly string _currentSystemId;
|
||||
|
||||
// All path text boxes should do some kind of error checking
|
||||
// Config path under base, config will default to %exe%
|
||||
|
@ -41,10 +42,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
"..\\"
|
||||
};
|
||||
|
||||
public PathConfig(MainForm mainForm, Config config)
|
||||
public PathConfig(MainForm mainForm, Config config, string currentSystemId)
|
||||
{
|
||||
_mainForm = mainForm;
|
||||
_config = config;
|
||||
_currentSystemId = currentSystemId;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
@ -59,7 +61,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void SetDefaultFocusedTab()
|
||||
{
|
||||
var tab = FindTabByName(GlobalWin.Game.System);
|
||||
var tab = FindTabByName(_currentSystemId);
|
||||
if (tab != null)
|
||||
{
|
||||
PathTabControl.SelectTab(tab);
|
||||
|
|
Loading…
Reference in New Issue