diff --git a/PCK-Studio/Controls/Editor/BoxEditorControl.cs b/PCK-Studio/Controls/Editor/BoxEditorControl.cs index c68bb6c3..5682b146 100644 --- a/PCK-Studio/Controls/Editor/BoxEditorControl.cs +++ b/PCK-Studio/Controls/Editor/BoxEditorControl.cs @@ -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; } diff --git a/PCK-Studio/Forms/Editor/CustomSkinEditor.cs b/PCK-Studio/Forms/Editor/CustomSkinEditor.cs index 0d2e467c..78ea1124 100644 --- a/PCK-Studio/Forms/Editor/CustomSkinEditor.cs +++ b/PCK-Studio/Forms/Editor/CustomSkinEditor.cs @@ -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); } }