Fix removing and editing
This commit is contained in:
parent
22df5af793
commit
604f59a2e5
@ -195,12 +195,21 @@ public partial class ReCodeItForm : Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void RemoveRemapButton_Click(object sender, EventArgs e)
|
private void RemoveRemapButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (AppSettings.Remapper.UseProjectMappings)
|
||||||
|
{
|
||||||
|
CrossCompiler.ActiveProject.RemapModels.RemoveAt(RemapTreeView.SelectedNode.Index);
|
||||||
|
ProjectManager.SaveCrossCompilerProjectModel(CrossCompiler.ActiveProject);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
DataProvider.Remaps?.RemoveAt(RemapTreeView.SelectedNode.Index);
|
DataProvider.Remaps?.RemoveAt(RemapTreeView.SelectedNode.Index);
|
||||||
RemapTreeView.SelectedNode?.Remove();
|
|
||||||
DataProvider.SaveMapping();
|
DataProvider.SaveMapping();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RemapTreeView.SelectedNode?.Remove();
|
||||||
|
}
|
||||||
|
|
||||||
private void EditRemapButton_Click(object sender, EventArgs e)
|
private void EditRemapButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
EditSelectedRemap(this, null);
|
EditSelectedRemap(this, null);
|
||||||
@ -913,7 +922,9 @@ public partial class ReCodeItForm : Form
|
|||||||
|
|
||||||
ResetAll();
|
ResetAll();
|
||||||
|
|
||||||
var remap = DataProvider.Remaps.ElementAt(_selectedRemapTreeIndex);
|
var remap = AppSettings.Remapper.UseProjectMappings
|
||||||
|
? CrossCompiler.ActiveProject.RemapModels.ElementAt(_selectedRemapTreeIndex)
|
||||||
|
: DataProvider.Remaps.ElementAt(_selectedRemapTreeIndex);
|
||||||
|
|
||||||
NewTypeName.Text = remap.NewTypeName;
|
NewTypeName.Text = remap.NewTypeName;
|
||||||
OriginalTypeName.Text = remap.OriginalTypeName;
|
OriginalTypeName.Text = remap.OriginalTypeName;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user