mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-15 17:27:56 +00:00
Fix layout file properties with proper tab loading.
This commit is contained in:
parent
0c58133531
commit
a09db22b48
1 changed files with 13 additions and 10 deletions
|
@ -65,22 +65,17 @@ namespace LayoutBXLYT
|
||||||
}
|
}
|
||||||
|
|
||||||
private STPropertyGrid propertyGrid;
|
private STPropertyGrid propertyGrid;
|
||||||
|
private object activeProperty;
|
||||||
public void LoadProperties(object properties)
|
public void LoadProperties(object properties)
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
|
|
||||||
MaterialMode = false;
|
MaterialMode = false;
|
||||||
|
|
||||||
AddTab("Properties");
|
activeProperty = properties;
|
||||||
|
|
||||||
if (propertyGrid == null || propertyGrid.Disposing || propertyGrid.IsDisposed)
|
AddTab("Properties", LoadPropertyData);
|
||||||
{
|
stToolStrip1.Items[0].PerformClick();
|
||||||
propertyGrid = new STPropertyGrid();
|
|
||||||
propertyGrid.Dock = DockStyle.Fill;
|
|
||||||
stPanel1.Controls.Add(propertyGrid);
|
|
||||||
}
|
|
||||||
|
|
||||||
propertyGrid.LoadProperty(properties, ProperyChanged);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProperyChanged()
|
private void ProperyChanged()
|
||||||
|
@ -178,7 +173,8 @@ namespace LayoutBXLYT
|
||||||
else
|
else
|
||||||
tabIndex = Runtime.LayoutEditor.NullPaneTabIndex;
|
tabIndex = Runtime.LayoutEditor.NullPaneTabIndex;
|
||||||
|
|
||||||
stToolStrip1.Items[tabIndex].PerformClick();
|
if (tabIndex < stToolStrip1.Items.Count)
|
||||||
|
stToolStrip1.Items[tabIndex].PerformClick();
|
||||||
|
|
||||||
Loaded = true;
|
Loaded = true;
|
||||||
}
|
}
|
||||||
|
@ -214,6 +210,13 @@ namespace LayoutBXLYT
|
||||||
Runtime.LayoutEditor.NullPaneTabIndex = tabIndex;
|
Runtime.LayoutEditor.NullPaneTabIndex = tabIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void LoadPropertyData(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
UpdateTabIndex();
|
||||||
|
propertyGrid = GetActiveEditor<STPropertyGrid>();
|
||||||
|
propertyGrid.LoadProperty(activeProperty, ProperyChanged);
|
||||||
|
}
|
||||||
|
|
||||||
public void LoadAnimationData(object sender, EventArgs e)
|
public void LoadAnimationData(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
UpdateTabIndex();
|
UpdateTabIndex();
|
||||||
|
|
Loading…
Reference in a new issue