Fixed inflation related bugs with SkinEditor

This commit is contained in:
MayNL
2026-04-11 20:07:14 -04:00
parent ec61c0ae0b
commit 3c142ec7df
2 changed files with 8 additions and 5 deletions

View File

@@ -88,7 +88,8 @@ namespace PckStudio.Controls
leggingsCheckBox.Checked = (box.ArmorMaskFlags & 4) != 0;
bootsCheckBox.Checked = (box.ArmorMaskFlags & 8) != 0;
mirrorCheckBox.Checked = box.Mirror;
inflationUpDown.Value = (decimal)box.Scale;
// if the XMLVersion doesn't support scaling, set this value to 0 because it's not supported and fixes a rendering issue - May
inflationUpDown.Value = boxVersion == 3 ? (decimal)box.Scale : 0;
CancelBoxChanged = false;
}

View File

@@ -53,7 +53,7 @@ namespace PckStudio.Forms.Editor
skinPartListBox.DisplayMember = "DisplayInfo";
_xmlVersion = xmlVersion;
boxEditorControl1.SetBOXVersion(xmlVersion);
_inflateOverlayParts = _xmlVersion > 0;
_inflateOverlayParts = _xmlVersion > 0 && _xmlVersion < 3;
skinAdjustmentsEditorControl1.SetSkin(skin);
}
@@ -447,10 +447,12 @@ namespace PckStudio.Forms.Editor
private void boxEditorControl1_BoxChanged(object sender, EventArgs e)
{
if(skinPartListBox.SelectedIndex > -1)
int index = skinPartListBox.SelectedIndex;
if (index > -1)
{
renderer3D1.ModelData[skinPartListBox.SelectedIndex] = boxEditorControl1.GetBOX();
_skinPartListBindingSource.ResetItem(skinPartListBox.SelectedIndex);
renderer3D1.ModelData[index] = boxEditorControl1.GetBOX();
_skinPartListBindingSource.ResetItem(index);
}
}