From 9c0c539bb8728e0f70f13436bdf3d86d3b134811 Mon Sep 17 00:00:00 2001 From: bobeaton Date: Sun, 1 Dec 2024 21:26:59 +0530 Subject: [PATCH] if the map isn't reversable, then don't have a fit about not doing the reverse conversion in the TECkit map editor --- Directory.Build.props | 2 +- .../TECkit Mapping Editor.cs | 29 +++++++++++-------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index a0a34ee..7ff3947 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ SILConverters SILConverters 5.3 - 5.3.0.0 + 5.3.1.0 8A50226C-84D0-4CAF-AF8F-B0284643C415 2024 SIL International diff --git a/src/TECkit Mapping Editor/TECkit Mapping Editor.cs b/src/TECkit Mapping Editor/TECkit Mapping Editor.cs index 5317eb2..cd455ac 100644 --- a/src/TECkit Mapping Editor/TECkit Mapping Editor.cs +++ b/src/TECkit Mapping Editor/TECkit Mapping Editor.cs @@ -671,22 +671,27 @@ private void textBoxSample_TextChanged(object sender, EventArgs e) private void textBoxSampleForward_TextChanged(object sender, EventArgs e) { - UpdateTextChanged(this.textBoxSampleForward, this.textBoxSampleReverse, m_aEC, false); - if (!m_bSampleChangedByTyping) - UpdateUnicodeDetails(this.textBoxSampleForward); - m_bSampleChangedByTyping = false; - string strTooltip = null; - if (textBoxSample.Text == textBoxSampleReverse.Text) + if (!EncConverters.IsUnidirectional(m_aEC.ConversionType)) { - this.labelRoundtrip.Text = cstrRoundTripDefaultLabel; - strTooltip = "Round-trip value matches!"; + UpdateTextChanged(this.textBoxSampleForward, this.textBoxSampleReverse, m_aEC, false); + if (!m_bSampleChangedByTyping) + UpdateUnicodeDetails(this.textBoxSampleForward); + m_bSampleChangedByTyping = false; + + if (textBoxSample.Text == textBoxSampleReverse.Text) + { + this.labelRoundtrip.Text = cstrRoundTripDefaultLabel; + strTooltip = "Round-trip value matches!"; + } + else + { + labelRoundtrip.Text = "*** " + cstrRoundTripDefaultLabel; + strTooltip = "Round-trip value doesn't match!"; + } } else - { - labelRoundtrip.Text = "*** " + cstrRoundTripDefaultLabel; - strTooltip = "Round-trip value doesn't match!"; - } + strTooltip = "Map doesn't round-trip."; strTooltip += String.Format("{0}{0}Left-side:\t{1}{0}Right-side:\t{2}{0}Roundtrip:\t{3}", Environment.NewLine,