Made settings show where they are
don't show bed leveling on temp message if leveling validation enabled
This commit is contained in:
parent
332f3ed9d5
commit
a25006f302
3 changed files with 18 additions and 11 deletions
|
|
@ -27,6 +27,7 @@ of the authors and should not be interpreted as representing official policies,
|
|||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
|
||||
|
|
@ -34,11 +35,18 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
public class SettingsValidationError : ValidationError
|
||||
{
|
||||
public SettingsValidationError(string settingsName)
|
||||
public SettingsValidationError(string settingsName, string presentationNameOverride = null)
|
||||
: base(settingsName)
|
||||
{
|
||||
this.CanonicalSettingsName = settingsName;
|
||||
this.PresentationName = PrinterSettings.SettingsData[settingsName].PresentationName;
|
||||
if (string.IsNullOrEmpty(presentationNameOverride))
|
||||
{
|
||||
this.PresentationName = PrinterSettings.SettingsData[settingsName].PresentationName;
|
||||
}
|
||||
else
|
||||
{
|
||||
PresentationName = presentationNameOverride;
|
||||
}
|
||||
}
|
||||
|
||||
public string CanonicalSettingsName { get; }
|
||||
|
|
@ -59,11 +67,11 @@ namespace MatterHackers.MatterControl
|
|||
setingsSectionName = "Slice Settings";
|
||||
}
|
||||
|
||||
return "Location".Localize() + ":"
|
||||
return "Location of the '{0}' setting".Localize().FormatWith(settingData.PresentationName) + ":"
|
||||
+ "\n" + setingsSectionName.Localize()
|
||||
+ "\n • " + settingData.OrganizerGroup.Category.Name.Localize()
|
||||
+ "\n • " + settingData.OrganizerGroup.Name.Localize()
|
||||
+ "\n • " + settingData.PresentationName.Localize();
|
||||
+ "\n • " + settingData.OrganizerGroup.Category.Name
|
||||
+ "\n • " + settingData.OrganizerGroup.Name
|
||||
+ "\n • " + settingData.PresentationName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -30,13 +30,11 @@ either expressed or implied, of the FreeBSD Project.
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.ConfigurationPage.PrintLeveling;
|
||||
using MatterHackers.MatterControl.DesignTools;
|
||||
using MatterHackers.MatterControl.SettingsManagement;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
|
|
@ -238,7 +236,8 @@ namespace MatterHackers.MatterControl
|
|||
&& !PrinterSetupRequired(printer)
|
||||
&& printer.Settings.Helpers.PrintLevelingData is PrintLevelingData levelingData
|
||||
&& !levelingData.IssuedLevelingTempWarning
|
||||
&& Math.Abs(bedTemperature - levelingData.BedTemperature) > 10)
|
||||
&& Math.Abs(bedTemperature - levelingData.BedTemperature) > 10
|
||||
&& !printer.Settings.Helpers.HasProbeWithLevelingValidation)
|
||||
{
|
||||
errors.Add(
|
||||
new ValidationError(ValidationErrors.BedLevelingTemperature)
|
||||
|
|
@ -390,7 +389,7 @@ namespace MatterHackers.MatterControl
|
|||
if (printer.Settings?.Helpers.ComPort() == "Emulator")
|
||||
{
|
||||
errors.Add(
|
||||
new SettingsValidationError(SettingsKey.com_port)
|
||||
new SettingsValidationError(SettingsKey.com_port, "Connected to Emulator".Localize())
|
||||
{
|
||||
Error = "You are connected to the Emulator not an actual printer.".Localize(),
|
||||
ErrorLevel = ValidationErrorLevel.Warning,
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
settingsValidationError.PresentationName,
|
||||
validationError.ErrorLevel == ValidationErrorLevel.Error ? "Error".Localize() : "Warning".Localize());
|
||||
|
||||
errorDetails = validationError.Error;
|
||||
errorDetails = validationError.Error + "\n\n" + settingsValidationError.Location;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue