Removing expand settings menu item

This commit is contained in:
Lars Brubaker 2020-12-31 13:08:37 -08:00
parent d882f04b07
commit cbdbe95337
2 changed files with 2 additions and 37 deletions

View file

@ -345,29 +345,6 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
this.PerformLayout();
}
public enum ExpansionMode
{
Expanded,
Collapsed
}
public void ForceExpansionMode(ExpansionMode expansionMode)
{
bool firstItem = true;
foreach (var sectionWidget in this.ActiveTab.TabContent.Descendants<SectionWidget>().Reverse())
{
if (firstItem)
{
sectionWidget.Checkbox.Checked = true;
firstItem = false;
}
else
{
sectionWidget.Checkbox.Checked = expansionMode == ExpansionMode.Expanded;
}
}
}
private void ExtendOverflowMenu(PopupMenu popupMenu)
{
var menu = popupMenu.CreateMenuItem("View Just My Settings".Localize());
@ -388,18 +365,6 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
}
};
popupMenu.CreateSeparator();
popupMenu.CreateMenuItem("Expand All".Localize()).Click += (s, e) =>
{
this.ForceExpansionMode(ExpansionMode.Expanded);
};
popupMenu.CreateMenuItem("Collapse All".Localize()).Click += (s, e) =>
{
this.ForceExpansionMode(ExpansionMode.Collapsed);
};
if (settingsContext.ViewFilter == NamedSettingsLayers.All)
{
popupMenu.CreateSeparator();

View file

@ -20,7 +20,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
testRunner.SwitchToPrinterSettings();
testRunner.ClickByName("Features Tab");
testRunner.ClickByName("Slice Settings Overflow Menu");
testRunner.ClickByName("Expand All Menu Item");
testRunner.ClickByName("Advanced Menu Item");
Assert.IsFalse(testRunner.WaitForName("print_leveling_solution Row", .5), "Print leveling should not exist for an Airwolf HD");
// Add printer that does not have hardware leveling
@ -29,7 +29,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
testRunner.SwitchToPrinterSettings();
testRunner.ClickByName("Features Tab");
testRunner.ClickByName("Slice Settings Overflow Menu");
testRunner.ClickByName("Expand All Menu Item");
testRunner.ClickByName("Advanced Menu Item");
Assert.IsTrue(testRunner.WaitForName("print_leveling_solution Row"), "Print leveling should exist for a 3D Factory MendelMax");
return Task.CompletedTask;