From 97e1fb9d23414d2f3e25e138b6e97ff577ab7e61 Mon Sep 17 00:00:00 2001 From: Greg Date: Fri, 4 Mar 2016 11:11:20 -0800 Subject: [PATCH] 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. --- PartPreviewWindow/ViewGcodeBasic.cs | 15 +++++++++++---- SlicerConfiguration/ActiveSliceSettings.cs | 1 + StaticData/Translations/Master.txt | 15 +++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/PartPreviewWindow/ViewGcodeBasic.cs b/PartPreviewWindow/ViewGcodeBasic.cs index 941290089..b9718ed75 100644 --- a/PartPreviewWindow/ViewGcodeBasic.cs +++ b/PartPreviewWindow/ViewGcodeBasic.cs @@ -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); } } diff --git a/SlicerConfiguration/ActiveSliceSettings.cs b/SlicerConfiguration/ActiveSliceSettings.cs index c46031658..6404f5e24 100644 --- a/SlicerConfiguration/ActiveSliceSettings.cs +++ b/SlicerConfiguration/ActiveSliceSettings.cs @@ -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; diff --git a/StaticData/Translations/Master.txt b/StaticData/Translations/Master.txt index 7456d73da..60da136bd 100644 --- a/StaticData/Translations/Master.txt +++ b/StaticData/Translations/Master.txt @@ -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* +