Disable RunningTaskRow expansion if lacking RichProgressWidget
- Issue MatterHackers/MCCentral#4411
This commit is contained in:
parent
97846baf25
commit
27fb7557f6
2 changed files with 11 additions and 2 deletions
|
|
@ -81,6 +81,8 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
imageButton.Margin = margin;
|
||||
}
|
||||
|
||||
public bool AlwaysShowArrow { get; set; }
|
||||
|
||||
private bool _expandable = true;
|
||||
public bool Expandable
|
||||
{
|
||||
|
|
@ -91,7 +93,9 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
{
|
||||
_expandable = value;
|
||||
|
||||
imageButton.SetIcon(_expandable ? arrowRight : new ImageBuffer());
|
||||
imageButton.SetIcon(_expandable || this.AlwaysShowArrow ? arrowRight : new ImageBuffer());
|
||||
imageButton.Enabled = _expandable;
|
||||
|
||||
this.MinimumSize = new Vector2((_expandable) ? this.MinimumSize.X : 10, this.MinimumSize.Y);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
VAnchor = VAnchor.Center | VAnchor.Fit,
|
||||
HAnchor = HAnchor.Stretch,
|
||||
Checked = false,
|
||||
Padding = 0
|
||||
Padding = 0,
|
||||
AlwaysShowArrow = true
|
||||
};
|
||||
expandButton.CheckedStateChanged += (s, e) =>
|
||||
{
|
||||
|
|
@ -179,6 +180,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
detailsPanel.AddChild(guiWidget);
|
||||
}
|
||||
else
|
||||
{
|
||||
expandButton.Expandable = false;
|
||||
}
|
||||
|
||||
if (taskDetails.Options?.ReadOnlyReporting == true)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue