Merge pull request #4087 from jlewin/master
Restore default "Calibration Parts" library container
This commit is contained in:
commit
70f57ee621
2 changed files with 13 additions and 2 deletions
|
|
@ -168,11 +168,12 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
private void EnableControls()
|
||||
{
|
||||
bool status = printer.Connection.IsConnected && !printer.Connection.PrinterIsPrinting;
|
||||
if (isEnabled != status)
|
||||
if (isEnabled != status
|
||||
&& this.PopupContent is GuiWidget popupContent)
|
||||
{
|
||||
isEnabled = status;
|
||||
|
||||
var flowLayout = this.PopupContent.Children.OfType<FlowLayoutWidget>().FirstOrDefault();
|
||||
var flowLayout = popupContent.Children.OfType<FlowLayoutWidget>().FirstOrDefault();
|
||||
if (flowLayout != null)
|
||||
{
|
||||
foreach (var child in flowLayout.Children.Except(alwaysEnabled))
|
||||
|
|
|
|||
|
|
@ -54,6 +54,16 @@ namespace MatterHackers.MatterControl.Library
|
|||
() => new SqliteLibraryContainer(rootLibraryCollection.Id)));
|
||||
}
|
||||
|
||||
this.ChildContainers.Add(
|
||||
new DynamicContainerLink(
|
||||
() => "Calibration Parts".Localize(),
|
||||
AggContext.StaticData.LoadIcon(Path.Combine("Library", "folder_20x20.png")),
|
||||
AggContext.StaticData.LoadIcon(Path.Combine("Library", "folder.png")),
|
||||
() => new CalibrationPartsContainer())
|
||||
{
|
||||
IsReadOnly = true
|
||||
});
|
||||
|
||||
this.ChildContainers.Add(
|
||||
new DynamicContainerLink(
|
||||
() => "Primitives".Localize(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue