Merge pull request #3119 from jlewin/design_tools
Start visible and toggle off to work around layout quirk
This commit is contained in:
commit
9d22d91b95
2 changed files with 6 additions and 3 deletions
|
|
@ -37,7 +37,6 @@ using MatterHackers.DataConverters3D;
|
|||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.CustomWidgets;
|
||||
using MatterHackers.MatterControl.DesignTools;
|
||||
using MatterHackers.MatterControl.DesignTools.Operations;
|
||||
using MatterHackers.MatterControl.Library;
|
||||
using MatterHackers.VectorMath;
|
||||
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
// TODO: lookup settings values
|
||||
bool anySettingOverridden = false;
|
||||
|
||||
var sectionWidget = new SectionWidget("Advanced", subPanel, theme, expanded: anySettingOverridden)
|
||||
var sectionWidget = new SectionWidget("Advanced", subPanel, theme, expanded: true)
|
||||
{
|
||||
Name = "Advanced Section",
|
||||
HAnchor = HAnchor.Stretch,
|
||||
|
|
@ -124,6 +124,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
};
|
||||
column.AddChild(sectionWidget);
|
||||
|
||||
sectionWidget.Load += (s, e) =>
|
||||
{
|
||||
sectionWidget.Checkbox.Checked = anySettingOverridden;
|
||||
};
|
||||
|
||||
foreach (var key in new[] { "spiral_vase", "layer_to_pause" })
|
||||
{
|
||||
var settingsData = SettingsOrganizer.Instance.GetSettingsData(key);
|
||||
|
|
@ -168,7 +173,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
CancellationToken.None);
|
||||
});
|
||||
};
|
||||
button.EnabledChanged += (s, e) => Console.WriteLine();
|
||||
column.AddChild(button);
|
||||
|
||||
return column;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue