Maintain state across ReloadAll

- Issue MatterHackers/MCCentral#2561
Configure -> Printer should survive ReloadAll
This commit is contained in:
John Lewin 2018-01-03 15:24:55 -08:00
parent 13b1051eb2
commit 38666e89c4
7 changed files with 89 additions and 26 deletions

View file

@ -38,11 +38,9 @@ namespace MatterHackers.MatterControl
{
public class ConfigurePrinterWidget : FlowLayoutWidget
{
public ConfigurePrinterWidget(PartTabPage partTabPage, ThemeConfig theme)
public ConfigurePrinterWidget(SliceSettingsWidget sliceSettingsWidget, ThemeConfig theme)
: base(FlowDirection.TopToBottom)
{
var sliceSettingsWidget = partTabPage.ChildrenRecursive<SliceSettingsWidget>().FirstOrDefault();
int tabIndex = 0;
var rowItem = sliceSettingsWidget.CreateItemRow(SliceSettingsOrganizer.SettingsData["printer_name"], ref tabIndex);
@ -68,7 +66,7 @@ namespace MatterHackers.MatterControl
{
Padding = new BorderDouble(10, 4)
};
primaryTabControl.AddTab(new TextTab(
tabPage,
section.Name + " Tab",