diff --git a/pwiz_tools/Skyline/SettingsUI/FullScanSettingsControl.cs b/pwiz_tools/Skyline/SettingsUI/FullScanSettingsControl.cs index 18cb2080ea..274c78b404 100644 --- a/pwiz_tools/Skyline/SettingsUI/FullScanSettingsControl.cs +++ b/pwiz_tools/Skyline/SettingsUI/FullScanSettingsControl.cs @@ -191,7 +191,7 @@ public double? PrecursorRes double precursorRes; return double.TryParse(textPrecursorRes.Text, out precursorRes) ? (double?)precursorRes : null; } - set { textPrecursorRes.Text = FormatPrecursorRes(value, PrecursorMassAnalyzer); } + set { textPrecursorRes.Text = FormatRes(value, PrecursorMassAnalyzer); } } public double? PrecursorResMz @@ -211,7 +211,7 @@ public double? ProductRes double productRes; return double.TryParse(textProductRes.Text, out productRes) ? (double?)productRes : null; } - set { textProductRes.Text = value.ToString(); } + set { textProductRes.Text = FormatRes(value, ProductMassAnalyzer); } } public double? ProductResMz @@ -885,7 +885,7 @@ public double TimeAroundPrediction get { return double.Parse(tbxTimeAroundPrediction.Text); } } - private static string FormatPrecursorRes(double? resolvingPower, FullScanMassAnalyzerType analyzerType) + private static string FormatRes(double? resolvingPower, FullScanMassAnalyzerType analyzerType) { if (!resolvingPower.HasValue) return string.Empty; @@ -921,7 +921,7 @@ public static void SetAnalyzerType(FullScanMassAnalyzerType analyzerTypeNew, labelTh.Visible = false; textAt.Visible = false; textRes.Enabled = true; - textRes.Text = FormatPrecursorRes( + textRes.Text = FormatRes( resCurrent.HasValue && (analyzerTypeCurrent == analyzerTypeNew) ? resCurrent : TransitionFullScan.DEFAULT_CENTROIDED_PPM, @@ -951,9 +951,9 @@ public static void SetAnalyzerType(FullScanMassAnalyzerType analyzerTypeNew, } if (analyzerTypeNew == analyzerTypeCurrent && resCurrent.HasValue) - textRes.Text = FormatPrecursorRes(resCurrent, analyzerTypeNew); + textRes.Text = FormatRes(resCurrent, analyzerTypeNew); else - textRes.Text = FormatPrecursorRes(TransitionFullScan.DEFAULT_RES_VALUES[(int)analyzerTypeNew], analyzerTypeNew); + textRes.Text = FormatRes(TransitionFullScan.DEFAULT_RES_VALUES[(int)analyzerTypeNew], analyzerTypeNew); labelAt.Visible = variableRes; textAt.Visible = variableRes;