Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VaIeroK committed Oct 20, 2022
1 parent 4d3bfd1 commit f30dcb8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion OGF tool/Forms/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ public Settings(EditorSettings settings)
{
InitializeComponent();
pSettings = settings;

BoxTextChanged(GameMtlPath, null);
BoxTextChanged(FSLtxPath, null);
BoxTextChanged(TexturesPath, null);
BoxTextChanged(ImagePath, null);
BoxTextChanged(OmfEditorPath, null);
BoxTextChanged(ObjectEditorPath, null);
}

public void SaveParams()
Expand Down Expand Up @@ -262,7 +269,7 @@ private void BoxTextChanged(object sender, EventArgs e)
int temp = textBox.SelectionStart;

int slash_idx = textBox.Text.LastIndexOf('\\');
if (slash_idx == textBox.Text.Count() - 1)
if (textBox.Text.Contains("\\") && slash_idx == textBox.Text.Count() - 1)
{
textBox.Text = textBox.Text.Substring(0, textBox.Text.LastIndexOf('\\'));

Expand Down

0 comments on commit f30dcb8

Please sign in to comment.