Fixed Bug: Slicing a part with no printer selected opens up Send Feedback form. We now open a message box prompting user to select a printer before slicing.

This commit is contained in:
Greg 2016-03-04 11:11:20 -08:00
parent 5a399d5c38
commit 97e1fb9d23
3 changed files with 27 additions and 4 deletions

View file

@ -1085,11 +1085,18 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
private void DoGenerateButton_Click(object state)
{
if (ActiveSliceSettings.Instance.IsValid() && printItem != null)
if (PrinterConnectionAndCommunication.Instance.ActivePrinter != null)
{
((Button)state).Visible = false;
SlicingQueue.Instance.QueuePartForSlicing(printItem);
startedSliceFromGenerateButton = true;
if (ActiveSliceSettings.Instance.IsValid() && printItem != null)
{
((Button)state).Visible = false;
SlicingQueue.Instance.QueuePartForSlicing(printItem);
startedSliceFromGenerateButton = true;
}
}
else
{
StyledMessageBox.ShowMessageBox(null, "Oops! Please select a printer in order to continue slicing.", "Select Printer", StyledMessageBox.MessageType.OK);
}
}

View file

@ -956,6 +956,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
return true;
}
string normalSpeedLocation = "Location: 'Settings & Controls' -> 'Settings' -> 'General' -> 'Speed'".Localize();
// If the given speed is part of the current slice engine then check that it is greater than 0.
if (!ValidateGoodSpeedSettingGreaterThan0("bridge_speed", normalSpeedLocation)) return false;

View file

@ -4606,3 +4606,18 @@ Translated:Set Name
English:MatterHackers - Set Name
Translated:MatterHackers - Set Name
English:Parse Error while slicing
Translated:Parse Error while slicing
English:Subject*
Translated:Subject*
English:Message*
Translated:Message*
English:Email Address*
Translated:Email Address*
English:Name*
Translated:Name*