Made print button disabled while printing
Calculate HasTransparency correctly
This commit is contained in:
parent
725ba3e2de
commit
21f1752724
3 changed files with 5 additions and 3 deletions
|
|
@ -345,7 +345,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
}
|
||||
else
|
||||
{
|
||||
if (ApplicationController.Instance.Extensions.GetEditorsForType(item.GetType())?.FirstOrDefault() is IObject3DEditor editor)
|
||||
if (item != null
|
||||
&& ApplicationController.Instance.Extensions.GetEditorsForType(item.GetType())?.FirstOrDefault() is IObject3DEditor editor)
|
||||
{
|
||||
ShowObjectEditor((editor, item, item.Name), selectedItem);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,7 +164,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
var errors = printer.Validate();
|
||||
|
||||
// Enable print option when no validation Errors exists
|
||||
var printEnabled = !errors.Any(err => err.ErrorLevel == ValidationErrorLevel.Error);
|
||||
var printingOrPause = printer.Connection.Printing || printer.Connection.Paused;
|
||||
var printEnabled = !printingOrPause && !errors.Any(err => err.ErrorLevel == ValidationErrorLevel.Error);
|
||||
|
||||
var startPrintButton = new TextButton("Start Print".Localize(), menuTheme)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 1f42aeef034a4dfdb8e60bcce88e1050f0a4f6d7
|
||||
Subproject commit 24cddc85a8579910692cf84f88723bb21edb220c
|
||||
Loading…
Add table
Add a link
Reference in a new issue