mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-29 10:24:34 +00:00
Fixed inflation related bugs with SkinEditor
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user