Fix regression with menu order
This commit is contained in:
parent
a4058f45c6
commit
c0e75da748
2 changed files with 108 additions and 111 deletions
|
|
@ -317,16 +317,35 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
Title = "Configure EEProm".Localize(),
|
||||
Action = configureEePromButton_Click,
|
||||
IsEnabled = () => printer.Connection.IsConnected
|
||||
},
|
||||
new NamedBoolAction()
|
||||
}
|
||||
};
|
||||
menuActions.Add(new NamedBoolAction()
|
||||
{
|
||||
Title = "Show Printer".Localize(),
|
||||
Action = () => { },
|
||||
GetIsActive = () => printer.ViewState.ConfigurePrinterVisible,
|
||||
SetIsActive = (value) => printer.ViewState.ConfigurePrinterVisible = value
|
||||
},
|
||||
new ActionSeparator(),
|
||||
new NamedAction()
|
||||
});
|
||||
var printerType = printer.Settings.Slicer.PrinterType;
|
||||
if (printerType == PrinterType.FFF)
|
||||
{
|
||||
menuActions.Add(new NamedBoolAction()
|
||||
{
|
||||
Title = "Show Controls".Localize(),
|
||||
Action = () => { },
|
||||
GetIsActive = () => printer.ViewState.ControlsVisible,
|
||||
SetIsActive = (value) => printer.ViewState.ControlsVisible = value,
|
||||
});
|
||||
menuActions.Add(new NamedBoolAction()
|
||||
{
|
||||
Title = "Show Terminal".Localize(),
|
||||
Action = () => { },
|
||||
GetIsActive = () => printer.ViewState.TerminalVisible,
|
||||
SetIsActive = (value) => printer.ViewState.TerminalVisible = value,
|
||||
});
|
||||
}
|
||||
menuActions.Add(new ActionSeparator());
|
||||
menuActions.Add(new NamedAction()
|
||||
{
|
||||
Title = "Import Presets".Localize(),
|
||||
Action = () =>
|
||||
|
|
@ -341,8 +360,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
new NamedAction()
|
||||
});
|
||||
menuActions.Add(new NamedAction()
|
||||
{
|
||||
Title = "Export Printer".Localize(),
|
||||
Action = () => UiThread.RunOnIdle(() =>
|
||||
|
|
@ -350,10 +369,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
ApplicationController.Instance.ExportAsMatterControlConfig(printer);
|
||||
}),
|
||||
Icon = StaticData.Instance.LoadIcon("cube_export.png", 16, 16, theme.InvertIcons),
|
||||
},
|
||||
new ActionSeparator(),
|
||||
|
||||
new NamedAction()
|
||||
});
|
||||
menuActions.Add(new ActionSeparator());
|
||||
menuActions.Add(new NamedAction()
|
||||
{
|
||||
Title = "Calibrate Printer".Localize(),
|
||||
Action = () => UiThread.RunOnIdle(() =>
|
||||
|
|
@ -364,9 +382,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
});
|
||||
}),
|
||||
Icon = StaticData.Instance.LoadIcon("compass.png", 16, 16, theme.InvertIcons)
|
||||
},
|
||||
new ActionSeparator(),
|
||||
new NamedAction()
|
||||
});
|
||||
menuActions.Add(new ActionSeparator());
|
||||
menuActions.Add(new NamedAction()
|
||||
{
|
||||
Title = "Update Settings...".Localize(),
|
||||
Action = () =>
|
||||
|
|
@ -374,16 +392,16 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
DialogWindow.Show(new UpdateSettingsPage(printer));
|
||||
},
|
||||
Icon = StaticData.Instance.LoadIcon("fa-refresh_14.png", 16, 16, theme.InvertIcons)
|
||||
},
|
||||
new NamedAction()
|
||||
});
|
||||
menuActions.Add(new NamedAction()
|
||||
{
|
||||
Title = "Restore Settings...".Localize(),
|
||||
Action = () =>
|
||||
{
|
||||
DialogWindow.Show(new PrinterProfileHistoryPage(printer));
|
||||
}
|
||||
},
|
||||
new NamedAction()
|
||||
});
|
||||
menuActions.Add(new NamedAction()
|
||||
{
|
||||
Title = "Reset to Defaults...".Localize(),
|
||||
Action = () =>
|
||||
|
|
@ -406,9 +424,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
"Revert Settings".Localize(),
|
||||
StyledMessageBox.MessageType.YES_NO);
|
||||
}
|
||||
},
|
||||
new ActionSeparator(),
|
||||
new NamedAction()
|
||||
});
|
||||
menuActions.Add(new ActionSeparator());
|
||||
menuActions.Add(new NamedAction()
|
||||
{
|
||||
Title = "Delete Printer".Localize(),
|
||||
Action = () =>
|
||||
|
|
@ -426,28 +444,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
StyledMessageBox.MessageType.YES_NO,
|
||||
"Delete Printer".Localize());
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
var printerType = printer.Settings.Slicer.PrinterType;
|
||||
if (printerType == PrinterType.FFF)
|
||||
{
|
||||
menuActions.Add(new NamedBoolAction()
|
||||
{
|
||||
Title = "Show Controls".Localize(),
|
||||
Action = () => { },
|
||||
GetIsActive = () => printer.ViewState.ControlsVisible,
|
||||
SetIsActive = (value) => printer.ViewState.ControlsVisible = value,
|
||||
});
|
||||
menuActions.Add(new NamedBoolAction()
|
||||
{
|
||||
Title = "Show Terminal".Localize(),
|
||||
Action = () => { },
|
||||
GetIsActive = () => printer.ViewState.TerminalVisible,
|
||||
SetIsActive = (value) => printer.ViewState.TerminalVisible = value,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
theme.CreateMenuItems(popupMenu, menuActions);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit c0d203ee77bf0eddc6bd570132a4d2237c44309b
|
||||
Subproject commit 7a1b29fcf96adb6a7f578cd23c75082db311c626
|
||||
Loading…
Add table
Add a link
Reference in a new issue